From patchwork Fri Oct 28 18:51:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 80015 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1324856qge; Fri, 28 Oct 2016 11:52:30 -0700 (PDT) X-Received: by 10.98.92.68 with SMTP id q65mr27106400pfb.53.1477680750169; Fri, 28 Oct 2016 11:52:30 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m70si14747871pfj.52.2016.10.28.11.52.30 for ; Fri, 28 Oct 2016 11:52:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sandiskcorp.onmicrosoft.com; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030257AbcJ1SwC (ORCPT ); Fri, 28 Oct 2016 14:52:02 -0400 Received: from mail-bn3nam01on0054.outbound.protection.outlook.com ([104.47.33.54]:19712 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754833AbcJ1Svy (ORCPT ); Fri, 28 Oct 2016 14:51:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NiX4MrwGKuyTNmPV5HuAtV9iUwd98wxAZ5b3uHMczT8=; b=Zck7z4Yf9NUAEzkKOUN/hi+643OMH/9DJHw6/pZBmpgrOBc4xKHcmC/W74SyUjKImdkF8a47fbYlui1Mk31E4SBpu6d8dmcZ5SlzAv2drd9yMkLVzC7tpkK/K0BBy8vIA7I7JIiSViyUSc+mWRk1TiZbBNHfZtMvmbSDHO4i9J4= Received: from DM5PR02CA0051.namprd02.prod.outlook.com (10.168.192.13) by BY2PR0201MB1575.namprd02.prod.outlook.com (10.163.154.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Fri, 28 Oct 2016 18:51:49 +0000 Received: from BN1AFFO11FD053.protection.gbl (2a01:111:f400:7c10::135) by DM5PR02CA0051.outlook.office365.com (2603:10b6:3:39::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16 via Frontend Transport; Fri, 28 Oct 2016 18:51:42 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN1AFFO11FD053.mail.protection.outlook.com (10.58.53.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.5 via Frontend Transport; Fri, 28 Oct 2016 18:51:41 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 5B.DA.26959.3AB93185; Fri, 28 Oct 2016 11:40:38 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Fri, 28 Oct 2016 11:51:38 -0700 X-AuditID: 0ac94369-b97ff7000001694f-d8-58139ba31b3b Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id CC.2D.02564.73E93185; Fri, 28 Oct 2016 11:51:38 -0700 (PDT) Subject: Re: [PATCH 11/12] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code To: Keith Busch References: <805e1911-cd10-0563-c76b-256d76054b08@sandisk.com> <20161028160145.GC5621@localhost.localdomain> CC: Jens Axboe , Christoph Hellwig , James Bottomley , "Martin K. Petersen" , Mike Snitzer , Doug Ledford , "Ming Lei" , Laurence Oberman , "linux-block@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "linux-nvme@lists.infradead.org" From: Bart Van Assche Message-ID: <655c62ca-5da8-3c8f-9e56-016b7d518267@sandisk.com> Date: Fri, 28 Oct 2016 11:51:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161028160145.GC5621@localhost.localdomain> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjleLIzCtJLcpLzFFi42LhOum8SHfZbOEIg1+XtS3+7znGZvHy/AdW i5WrjzJZrJqYZ3Hv6Bcmi723tC3mL3vKbvHsUC+LRff1HWwW5z+8YrJYfvwfk0Xbxq+MFu9/ XGd34PWY2PyO3WPnrLvsHov3vGTyeHBoM4vH5iX1HrtvNrB5fHx6i8Xj/b6rbB6fN8kFcEZx 2aSk5mSWpRbp2yVwZbz5vpSxYI5nxc7Jn9gbGFfbdjFyckgImEhcWXOEsYuRi0NIYCmTxNEL U9khnB2MEo+W3mGBqXq4+BETVBWjREf/K9YuRg4OYYEUicbrzCA1IgLqEv9+vWIDsYUEFjNK tE6XA6lnFtjAIvH88F6wQWwCRhLf3s8Es3kF7CTO/p4J1sAioCrx4O0xsLioQITEpq9zoGo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g8jVP42wXbmcNP/HaSbXu ZJhRi2nLMrFLf9ffMrFTO3dyYrul2y+b7sk/N9ptXT33ynKuv+7s7257bisMK9MyXdrV3L9q xtELZbV1z0QeN3BW690KTtt34vr3mMk615+mPA6cosRSnJFoqMVcVJwIABKOr8EiAgAA X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(377454003)(189002)(24454002)(199003)(31686004)(64126003)(6666003)(36756003)(54356999)(5890100001)(50986999)(356003)(81156014)(8936002)(7846002)(8676002)(97736004)(69596002)(83506001)(86362001)(512874002)(76176999)(81166006)(65956001)(65806001)(68736007)(87936001)(77096005)(31696002)(84326002)(33646002)(11100500001)(6916009)(2270400002)(7416002)(2906002)(5660300001)(2476003)(2950100002)(4810100001)(110136003)(305945005)(65826007)(270700001)(4326007)(626004)(586003)(4001350100001)(92566002)(53416004)(189998001)(568964002)(106466001)(4610100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1575; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD053; 1:vkMpaFPciGzfQhqrYWT6Ejc4y7r8jp3cGM7t6HyNih64W06RvAxoSMgyqJKAfux3WDmTKtj+mLyR33hNgUcEAzbSGoEEP+hPL/qvFxyqAMD67Gmc2RClhORqzNX6YeeyutvhNRXYvPB5w/JNmXIEpiHp1uLYfHyKKo84g0BU6YW5W2OF4kCWL1/XJV4mL40OiQtA6VlceQBM20YURhpO4xyK3E96xqNKq7xJ2QwRpfhNdIwVM7IwPkHeXCVdIsb3ahyLNhhODoV6FJKEfcHdhTW1g85jmqF+sbQ6J95LLO/ClU2G36RAsKO0mCY5jzzD7b3+bJnykWSmaPc/BdaaygOZ+K1z6m/IKxnexAFAvWATKEn+ByKJWhflhjVRBNvc7x51ztR7RTar1Jq69YIFq068XuTPlHD7RdrGwuW4lUjuW+njatZ5THDC6ynuwisu6NX92WgI0ufhVbLv/kS7W5cqMMtU+H9Ml+nOVvwu+0+AYDuCOKbUEn6UrTgNKZ8dSZvsrHEiq18F17KxVbTkRgZfUh3lSN58bznh0YaHRZN+kEb//CwQCeWh3wQ+KJgj X-MS-Office365-Filtering-Correlation-Id: 45449dbc-fb6b-49f9-aa8d-08d3ff6375a0 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1575; 2:hAsQPrx5UoCPI3lETeS6T/NMzct09pm9jpMv5ICwQ5eWVSrrKyMKL8yIFuXa86IaeK4Avh7v9hkVgQQk7o0EWe0WJfJGPpKZ8A2wB9R5ZaKOrrK6u7qBn0xRwm6IMPGjSBlvZO8xNN2FAjG0LcqNWwJgl0lq/VU/P5HPaLYW31oaLcHEo5vNFtacyfPDY4Egrq5tyPaMSpuNOAH1ldGEeA==; 3:bdIpxbO0aWXZzWF0tunJ6b4zIOV1nz6+9uX+xFJoh27TKLuiz60ngs5FlTwu8id3aiTAtObEwK1F9SxL8mBlLlQj+we6s+td7jLq5PhycW7M5cHHdnLioaLOV++jEoJVF18+pecgjRQdfC4NxIbMBT6xcZLqL53sM3lx9SCm5Ofu2vjJbBeD05PW3soy8LIP2t9cCqmjYq3rDa4yUyCgysByrRaPEen16Sb2BaPKBuLnqQo0gRFyrWZ/bNGtQUoLccM1vleF+gdtnvFz6Ieh5bUWm+OrV4DzGKkenChbXk4= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BY2PR0201MB1575; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1575; 25:qd4ZCNdha1c7RGXFvlt7SKT3Gjf3xjptK01z+z4jy5BTnRwEC3p+Z2PLkryXetkqFDgqRWG4SUB0QpUJWk82CZH8Wer6hqzjNUcSr9mu+K20ZSJf8q9kY3JPp9Voha+MOnmeqczBP4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lEjXWkPS7o+MZJs5lGNziY8E6TAxw5eN7/9wBfmciWhLqjSMU5mJigUc/xddc+dH2v9TF3w=; 20:7PiMBHvbg2bOgjMKWtDor2vDE4+BIdQCHB57K0AS80WnLytMV0LBFFYH90lpJ8DsCi62+Y7krRuXhjYV/3C40f+r1BPi3pj8T385RSUn1dpzOHXZhS5OKbw/060vrEj3ss+i35pXEPY1OmASHbCYcI9vJicK1QHHpxKJIpqZHxaPX7xiB33VeE6Rs5zEIuxSh4zvQPxytBnxF9X7CMb46lP/FkxaL+EU3dp1mI9ffoloXXRw78YxbwkIs1Ren0rZJuuE3m1pKaSOOja3eB0ozTpdN28BGHa72Lhn4GC5wk/NjBd4jYA+nS8R7qhbXeHScVjljoLDf4d7SFhP9+Zqpk/omRqhzg1N1+F6H/vwfne1US893xaF5QT+qVReiBkjj4IDSCAfB9B/50iUNnumHbuKtJUOJx1Z7Yr280IGDfaKW2N/wE+vDjLJfMvhc+nrTC2L7aw2/rocTJEYtRpB5dVJEJl3YzOMWhEQgvId+ivsXG7YD+har/deolNW5mQH X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(6040176)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(3002001)(10201501046)(6055026); SRVR:BY2PR0201MB1575; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0201MB1575; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1575; 4:VhGVx1El6RvkK3xM1sotd6ov/rQXghModzE84Y7oCP5q4xm5H5AapgQwr0TNmKBKhMJxi5PCdcdOBIF2UZUhD0dGTMVWQr+ud1oMM68uYXcupLurH9mHXcHKZ09ZS3TCCkC9PaGg7PwnNcMgyTfdTm9ahg6pGd/T4vZDyYqhrn2aa4Rvl6LmyJDcJWp18NAUg8icqfr47nMU9mPx8SRcAHHAFs9fhGrCk1qgkmQoepZ1+aTt05ru7ERBCARK18zqzQbJ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Y656Ew19xahDu9g6/zr0EJd0KY8G8E4oqv9EQGg5pE+X/AbxTSL2RmftQvC3PTFKPSjXS8pSJg+M1s3T22GpED6aightZ4N7KYeAG6G3kZJScJMlu+UtT8zooNUKLjCSw1lHA+5xojsWxicsc9L4tZR5FYHAVHCSckTwwdSsv8RRrP+S5+CHrPgdpDqN X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2016 18:51:41.8293 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1575 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org On 10/28/2016 08:51 AM, Keith Busch wrote: > On Wed, Oct 26, 2016 at 03:56:04PM -0700, Bart Van Assche wrote: >> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c >> index 7bb73ba..b662416 100644 >> --- a/drivers/nvme/host/core.c >> +++ b/drivers/nvme/host/core.c >> @@ -205,7 +205,7 @@ void nvme_requeue_req(struct request *req) >> >> blk_mq_requeue_request(req, false); >> spin_lock_irqsave(req->q->queue_lock, flags); >> - if (!blk_queue_stopped(req->q)) >> + if (!blk_mq_queue_stopped(req->q)) >> blk_mq_kick_requeue_list(req->q); >> spin_unlock_irqrestore(req->q->queue_lock, flags); >> } >> @@ -2079,10 +2079,6 @@ void nvme_stop_queues(struct nvme_ctrl *ctrl) >> >> mutex_lock(&ctrl->namespaces_mutex); >> list_for_each_entry(ns, &ctrl->namespaces, list) { >> - spin_lock_irq(ns->queue->queue_lock); >> - queue_flag_set(QUEUE_FLAG_STOPPED, ns->queue); >> - spin_unlock_irq(ns->queue->queue_lock); >> - >> blk_mq_cancel_requeue_work(ns->queue); >> blk_mq_stop_hw_queues(ns->queue); > > There's actually a reason the queue stoppage is using a different flag > than blk_mq_queue_stopped: kicking the queue starts stopped queues. > The driver has to ensure the requeue work can't be kicked prior to > cancelling the current requeue work. Once we know requeue work isn't > running and can't restart again, then we're safe to stop the hw queues. > > It's a pretty obscure condition, requiring the controller post an > error completion at the same time the driver decides to reset the > controller. Here's the sequence with the wrong outcome: > > CPU A CPU B > ----- ----- > nvme_stop_queues nvme_requeue_req > blk_mq_stop_hw_queues if (blk_mq_queue_stopped) <- returns false > blk_mq_stop_hw_queue blk_mq_kick_requeue_list > blk_mq_requeue_work > blk_mq_start_hw_queues Hello Keith, I think it is wrong that kicking the requeue list starts stopped queues because this makes it impossible to stop request processing without setting an additional flag next to BLK_MQ_S_STOPPED. Can you have a look at the attached two patches? These patches survive my dm-multipath and SCSI tests. Thanks, Bart. >From 47eec3bdcf4b673e3ab606543cb3acdf7f4de593 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 28 Oct 2016 10:50:04 -0700 Subject: [PATCH 2/2] blk-mq: Remove blk_mq_cancel_requeue_work() Since blk_mq_requeue_work() no longer restarts stopped queues canceling requeue work is no longer needed to prevent that a stopped queue would be restarted. Hence remove this function. --- block/blk-mq.c | 6 ------ drivers/md/dm-rq.c | 2 -- drivers/nvme/host/core.c | 1 - include/linux/blk-mq.h | 1 - 4 files changed, 10 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 24dfd0d..1aa79e5 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -557,12 +557,6 @@ void blk_mq_add_to_requeue_list(struct request *rq, bool at_head, } EXPORT_SYMBOL(blk_mq_add_to_requeue_list); -void blk_mq_cancel_requeue_work(struct request_queue *q) -{ - cancel_delayed_work_sync(&q->requeue_work); -} -EXPORT_SYMBOL_GPL(blk_mq_cancel_requeue_work); - void blk_mq_kick_requeue_list(struct request_queue *q) { kblockd_schedule_delayed_work(&q->requeue_work, 0); diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index b951ae83..7f426ab 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -102,8 +102,6 @@ static void dm_mq_stop_queue(struct request_queue *q) if (blk_mq_queue_stopped(q)) return; - /* Avoid that requeuing could restart the queue. */ - blk_mq_cancel_requeue_work(q); blk_mq_stop_hw_queues(q); /* Wait until dm_mq_queue_rq() has finished. */ blk_mq_quiesce_queue(q); diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index d6ab9a0..a67e815 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2075,7 +2075,6 @@ void nvme_stop_queues(struct nvme_ctrl *ctrl) list_for_each_entry(ns, &ctrl->namespaces, list) { struct request_queue *q = ns->queue; - blk_mq_cancel_requeue_work(q); blk_mq_stop_hw_queues(q); blk_mq_quiesce_queue(q); } diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 76f6319..35a0af5 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -221,7 +221,6 @@ void __blk_mq_end_request(struct request *rq, int error); void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list); void blk_mq_add_to_requeue_list(struct request *rq, bool at_head, bool kick_requeue_list); -void blk_mq_cancel_requeue_work(struct request_queue *q); void blk_mq_kick_requeue_list(struct request_queue *q); void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs); void blk_mq_abort_requeue_list(struct request_queue *q); -- 2.10.1