From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EB95C4332F for ; Fri, 21 Oct 2022 02:48:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbiJUCsA (ORCPT ); Thu, 20 Oct 2022 22:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbiJUCr7 (ORCPT ); Thu, 20 Oct 2022 22:47:59 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED8A1A2E35 for ; Thu, 20 Oct 2022 19:47:57 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MtpmL6rwBzHv62; Fri, 21 Oct 2022 10:47:46 +0800 (CST) Received: from [10.169.59.127] (10.169.59.127) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 21 Oct 2022 10:47:54 +0800 Subject: Re: [PATCH 2/8] blk-mq: skip non-mq queues in blk_mq_quiesce_queue To: Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg CC: Ming Lei , , References: <20221020105608.1581940-1-hch@lst.de> <20221020105608.1581940-3-hch@lst.de> From: Chao Leng Message-ID: <25cf9a6a-9224-0b35-6dec-194440d4e58d@huawei.com> Date: Fri, 21 Oct 2022 10:47:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20221020105608.1581940-3-hch@lst.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.169.59.127] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On 2022/10/20 18:56, Christoph Hellwig wrote: > For submit_bio based queues there is no (S)RCU critical section during > I/O submission and thus nothing to wait for in blk_mq_wait_quiesce_done, > so skip doing any synchronization. > > Signed-off-by: Christoph Hellwig > --- > block/blk-mq.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 33292c01875d5..df967c8af9fee 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -280,7 +280,9 @@ EXPORT_SYMBOL_GPL(blk_mq_wait_quiesce_done); > void blk_mq_quiesce_queue(struct request_queue *q) > { > blk_mq_quiesce_queue_nowait(q); > - blk_mq_wait_quiesce_done(q); > + /* nothing to wait for non-mq queues */ > + if (queue_is_mq(q)) > + blk_mq_wait_quiesce_done(q); For the non-mq queues, maybe we should add a synchronize_rcu. if (queue_is_mq(q)) blk_mq_wait_quiesce_done(q); else synchronize_rcu(); > } > EXPORT_SYMBOL_GPL(blk_mq_quiesce_queue); > >