From patchwork Fri Jan 19 15:20:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10175575 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C477560392 for ; Fri, 19 Jan 2018 15:21:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B823A285D4 for ; Fri, 19 Jan 2018 15:21:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6E27286C6; Fri, 19 Jan 2018 15:21:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38739286C4 for ; Fri, 19 Jan 2018 15:21:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5D3672FE9; Fri, 19 Jan 2018 15:21:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B18C5D6A2; Fri, 19 Jan 2018 15:21:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C6EAD1800B62; Fri, 19 Jan 2018 15:21:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0JFL9VX016198 for ; Fri, 19 Jan 2018 10:21:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id DFEC460BE3; Fri, 19 Jan 2018 15:21:09 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FA9860A9D; Fri, 19 Jan 2018 15:20:56 +0000 (UTC) Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) (using TLSv1.2 with cipher RC4-SHA (112/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A62798B10F; Fri, 19 Jan 2018 15:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1516375245; x=1547911245; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=yWv19su0gqldnr0jjDRMJxcJc/K9GqPrjqBry8zGKjs=; b=BGZalaf5FNj03u+ZFudbXsr26EUs0B19eDMkl0jG0Mzq2qhS6s0Zd3Bb AnblWZkqVOuhotULOBv/mIo4LuXqSP0Gbr7mMOI5OCmBsbDIgvoKPAb2g HWcUhgNh3y+901R569xXnWLhNSrxcjuHTYDyw/HmGW4TOYg8OKR/2X+Uz yG+AbPM+IVrxVWmjFBGIVylvGAr31CNwvkD3kzo9iYhat5lthhr2cVs07 cFwXLjn7x+OEpw84Nxd6rHlSTazcXEs9CQpmO2WUOme94AAK/vB6g99c7 IhPShcdTxzMqMPwbyiDNf5AVNsVGdXSmloBq9YbPQZwiRWJjHokN2n27H Q==; X-IronPort-AV: E=Sophos;i="5.46,381,1511798400"; d="scan'208";a="69949509" Received: from mail-sn1nam02lp0024.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.24]) by ob1.hgst.iphmx.com with ESMTP; 19 Jan 2018 23:20:17 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yWv19su0gqldnr0jjDRMJxcJc/K9GqPrjqBry8zGKjs=; b=N+UpRBDTFs0lFslv0MbdwUv2UK/Vayipi2ZN3IiUFX7MPFBpOcS7sjEBVD1ePaJ/TGkRn6vNgyELmVY/e3MAl+Sx2skGdheiHu3TS2NtazYQYjtaE2KfAEIzHmbCNVJaQKW8nCvIzrs2ZafIcvexrf6u7j9DbBByTVIdpemWR2A= Received: from CY1PR0401MB1536.namprd04.prod.outlook.com (10.163.19.154) by CY1PR0401MB1114.namprd04.prod.outlook.com (10.160.161.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 19 Jan 2018 15:20:14 +0000 Received: from CY1PR0401MB1536.namprd04.prod.outlook.com ([10.163.19.154]) by CY1PR0401MB1536.namprd04.prod.outlook.com ([10.163.19.154]) with mapi id 15.20.0428.014; Fri, 19 Jan 2018 15:20:13 +0000 From: Bart Van Assche To: "ming.lei@redhat.com" , "axboe@kernel.dk" Thread-Topic: [RFC PATCH] blk-mq: fixup RESTART when queue becomes idle Thread-Index: AQHTkAXlp7DN5JBZKUeyLfttG5XpOaN52OmAgAADroCAAATDAIAAE3uAgAAE1gCAABc0gIAAaoKAgAAZS4CAADjnAIAAhGAA Date: Fri, 19 Jan 2018 15:20:13 +0000 Message-ID: <1516375212.3190.4.camel@wdc.com> References: <20180118024124.8079-1-ming.lei@redhat.com> <20180118170353.GB19734@redhat.com> <1516296056.2676.23.camel@wdc.com> <20180118183039.GA20121@redhat.com> <1516301278.2676.35.camel@wdc.com> <20180119023212.GA25413@ming.t460p> <20180119072623.GB25369@ming.t460p> In-Reply-To: <20180119072623.GB25369@ming.t460p> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@wdc.com; x-originating-ip: [76.126.112.182] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY1PR0401MB1114; 7:ZJFdufYkecU73VW/sfDvHEH9zKU44A4t3a2JCOWEI+6h9SznPFDNIwdLHMHvSaY7aIeQbv+I+p3J8SEx8CGnKT4zsX6wiMVFmUY0/z9Foi6m0WlfUaJfLtJnG0Ewp7JwKu3vsg5g8q2uOImvzUCQbt7Vrre9POUJ0nVIZ/mEM2mkzKYkJFTXjZs7COggiHuF1sTBykZhdjfQUXd30yx4yZyCd+115ssCg7MHsOOQRt3UwiyKEgKDABnwkrCv+YeQ; 20:hlk8WckGrHAXsZ02rlTsuavEE0U555SHRfWzWCN+qfCSXLh9X8vKDmdpDv7ugPuNCxZpIJ/kaTP5eXk1t9P3ytifyPYY7RymALnWuprY3B/FM9ZcPodMgHuE0tEYzjY7waY0VFM6qTLrZM5aXfcMYGTmHtfoXex2w9KKW54D6Qc= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 6cf4dc82-3b11-4e3d-b6f9-08d55f502377 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060)(7193020); SRVR:CY1PR0401MB1114; x-ms-traffictypediagnostic: CY1PR0401MB1114: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231023)(2400079)(944501161)(6055026)(6041268)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY1PR0401MB1114; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR0401MB1114; x-forefront-prvs: 0557CBAD84 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(396003)(39380400002)(39860400002)(376002)(346002)(189003)(199004)(377424004)(25786009)(103116003)(66066001)(6506007)(3846002)(8936002)(6116002)(6246003)(93886005)(4326008)(76176011)(2906002)(14454004)(316002)(8676002)(102836004)(110136005)(81166006)(7736002)(305945005)(81156014)(478600001)(5660300001)(72206003)(54906003)(77096007)(6436002)(36756003)(2501003)(99286004)(106356001)(6486002)(6512007)(105586002)(53936002)(2950100002)(86362001)(3280700002)(97736004)(2900100001)(3660700001)(229853002)(68736007)(26005); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0401MB1114; H:CY1PR0401MB1536.namprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-microsoft-antispam-message-info: H8+NFsCawYcmiJ0ZQ7Yu2DH1WUcM27bBABj2f2SnmpN/IZE7tyAsg+mqrRDtZgyfC03HK4EcSVkqi3DcMMF7OQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cf4dc82-3b11-4e3d-b6f9-08d55f502377 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2018 15:20:13.8613 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1114 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 19 Jan 2018 15:20:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 19 Jan 2018 15:20:44 +0000 (UTC) for IP:'216.71.153.141' DOMAIN:'esa3.hgst.iphmx.com' HELO:'esa3.hgst.iphmx.com' FROM:'Bart.VanAssche@wdc.com' RCPT:'' X-RedHat-Spam-Score: -0.8 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW) 216.71.153.141 esa3.hgst.iphmx.com 216.71.153.141 esa3.hgst.iphmx.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MIME-Autoconverted: from base64 to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id w0JFL9VX016198 X-loop: dm-devel@redhat.com Cc: "linux-block@vger.kernel.org" , "snitzer@redhat.com" , "linux-kernel@vger.kernel.org" , "hch@infradead.org" , "dm-devel@redhat.com" , "osandov@fb.com" Subject: Re: [dm-devel] [RFC PATCH] blk-mq: fixup RESTART when queue becomes idle X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 19 Jan 2018 15:21:13 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 2018-01-19 at 15:26 +0800, Ming Lei wrote: > Please see queue_delayed_work_on(), hctx->run_work is shared by all > scheduling, once blk_mq_delay_run_hw_queue(100ms) returns, no new > scheduling can make progress during the 100ms. How about addressing that as follows: Bart. --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel diff --git a/block/blk-mq.c b/block/blk-mq.c index f7515dd95a36..57f8379a476d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1403,9 +1403,9 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async, put_cpu(); } - kblockd_schedule_delayed_work_on(blk_mq_hctx_next_cpu(hctx), - &hctx->run_work, - msecs_to_jiffies(msecs)); + kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), + &hctx->run_work, + msecs_to_jiffies(msecs)); } void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs)