Message ID | 489a9322eed1f95f8770752cc715084f1fa961d3.1667314759.git.nickyc975@zju.edu.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3045484wru; Tue, 1 Nov 2022 08:38:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ke5mMYxAupzguYA8w/WgvmNce7Qd2CV92XzYMqhBLhQteCG8g+vn7wvaaVFmL9AqqT3pM X-Received: by 2002:a05:6402:1cc1:b0:453:1517:94e4 with SMTP id ds1-20020a0564021cc100b00453151794e4mr19771205edb.399.1667317136559; Tue, 01 Nov 2022 08:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667317136; cv=none; d=google.com; s=arc-20160816; b=yGoq22eZ1zbS/BiFk+VXg8ywvSxPs6pwRXPM0WkDqsmRNozpR4suixvTcxhRZp2jMm 9j/+6oljHxzflCc8z8ud8MA6CLtjwjuMezGovhZEJs8HGjKeAHB9WdN01Saiy2Zn1II9 U89sGPJv5FiznHJA7pbAIwBA4Fk4wucTfPaav2ib39+JuNwGahca6oJvXaz52YrOF2WX 0D1iLHpUlTXYMTKx6QGq2N3Jb4lKW3sXWPPV7AGmrDL+wEWiqwnw/Pva2BerWdz4TG0u ZfswNBVTlmU0/dt6t5VFs7CtwTIsZhfQFEIyHDM+ELMyHan/Lw8M164S+qZXYI0pZZIQ hBPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YJEebztGfhblnOOM5MXmIlHEVRQP9WZmdHxPzcR8pFY=; b=Ri4XZxdQVq99pt93CPYh46RxZnhfC4yVh7wF0b9G/W8d/Jfhd+2CWLekNFHdfseqJF PDThZzeqSMdfckax9Yhzrk3Pcr+ZKKJL7QahyLhadpkxBV+6sJKqZ9bBCjzQSm9STEqx xVPgU8gr5y9NBnquL4DAUSqJxBH91O5wvVy3wicf0LnyOjQT1Sh85Zna4HNFlGWeQaQS MVfVmsTu6w9126/+vGTUml0DiWjEHgzMALnAibhFSqDtQ4jAFRVZK/6taF9HiJtGuS20 4AHdBog5SowK/B8fBtk2vRBAcnTsvZ3ARLrKU9uMbJ0Qjy6gwXqW63vGllJdM3tmBdXy 3Mrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq42-20020a1709073f2a00b007a1d4f0e7fcsi13201544ejc.655.2022.11.01.08.38.33; Tue, 01 Nov 2022 08:38:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230291AbiKAPPa (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 11:15:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231520AbiKAPPH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 11:15:07 -0400 Received: from zju.edu.cn (mail.zju.edu.cn [61.164.42.155]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1E3411BE93; Tue, 1 Nov 2022 08:12:04 -0700 (PDT) Received: from localhost.localdomain (unknown [10.14.30.251]) by mail-app4 (Coremail) with SMTP id cS_KCgCH_k0qN2FjsHmtBw--.39315S3; Tue, 01 Nov 2022 23:12:02 +0800 (CST) From: Jinlong Chen <nickyc975@zju.edu.cn> To: axboe@kernel.dk Cc: hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, nickyc975@zju.edu.cn Subject: [PATCH 1/4] blk-mq: update comment for blk_mq_quiesce_queue_nowait() Date: Tue, 1 Nov 2022 23:11:34 +0800 Message-Id: <489a9322eed1f95f8770752cc715084f1fa961d3.1667314759.git.nickyc975@zju.edu.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <cover.1667314759.git.nickyc975@zju.edu.cn> References: <cover.1667314759.git.nickyc975@zju.edu.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cS_KCgCH_k0qN2FjsHmtBw--.39315S3 X-Coremail-Antispam: 1UD129KBjvdXoWrtFy8Kry7Ww15Xr4xKryUZFb_yoWkCFg_Gw 1qvr10kFs8Gr1a9F4YkFW5ZFWrKay8JF43JFWIg39xX3s2yFsxA3y29r15CrZ3WanrGa13 Jr4UWa43Ar4SgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbIAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AK wVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20x vE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E 87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1lnxkEFVAIw20F6c xK64vIFxWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2Wl Yx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbV WUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij 64vIr41l42xK82IY6x8ErcxFaVAv8VW8uw4UJr1UMxC20s026xCaFVCjc4AY6r1j6r4UMI 8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AK xVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI 8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280 aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyT uYvjfUOlksUUUUU X-CM-SenderInfo: qssqjiaqqzq6lmxovvfxof0/1tbiAgIAB1ZdtcLuXwAGsM X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748308733687475239?= X-GMAIL-MSGID: =?utf-8?q?1748308733687475239?= |
Series |
some random cleanups for blk-mq.c
|
|
Commit Message
Jinlong Chen
Nov. 1, 2022, 3:11 p.m. UTC
blk_mq_quiesce_queue_nowait() is now reasonably used by scsi_host_block()
to avoid calling synchronize_rcu() for each LUN. We should not consider to
remove it.
See commit f983622ae60516d634008c7b1ff9ffff4f7bb8ae ("scsi: core: Avoid
calling synchronize_rcu() for each device in scsi_host_block()")
Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn>
---
block/blk-mq.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Comments
On Tue, Nov 01, 2022 at 11:11:34PM +0800, Jinlong Chen wrote: > blk_mq_quiesce_queue_nowait() is now reasonably used by scsi_host_block() > to avoid calling synchronize_rcu() for each LUN. We should not consider to > remove it. I strongly disagree about this being a reasonable use. What SCSI did there is a horrible hack that should have never been merged. The right thing to do is the per-tag_set quiesce that we've been working on.
> On Tue, Nov 01, 2022 at 11:11:34PM +0800, Jinlong Chen wrote: > > blk_mq_quiesce_queue_nowait() is now reasonably used by scsi_host_block() > > to avoid calling synchronize_rcu() for each LUN. We should not consider to > > remove it. > > I strongly disagree about this being a reasonable use. What SCSI did > there is a horrible hack that should have never been merged. The > right thing to do is the per-tag_set quiesce that we've been working > on. Ok, I guess I need to read the per-tag_set quiesce patch series. Thanks! Jinlong Chen
diff --git a/block/blk-mq.c b/block/blk-mq.c index 623e8a506539..7ceceea91b3b 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -237,9 +237,12 @@ void blk_mq_unfreeze_queue(struct request_queue *q) } EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue); -/* - * FIXME: replace the scsi_internal_device_*block_nowait() calls in the - * mpt3sas driver such that this function can be removed. +/** + * blk_mq_quiesce_queue_nowait() - start the quiesce of the queue + * @q: request queue. + * + * Note: synchronize_rcu() or synchronize_srcu(q->srcu) needs to + * be called to ensure the quiesce is done. */ void blk_mq_quiesce_queue_nowait(struct request_queue *q) {