From patchwork Wed Oct 26 22:52: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: 9398575 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 A7C7060477 for ; Wed, 26 Oct 2016 22:52:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70CD829E21 for ; Wed, 26 Oct 2016 22:52:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65A3829E27; Wed, 26 Oct 2016 22:52:53 +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=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE69729E21 for ; Wed, 26 Oct 2016 22:52:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933700AbcJZWwv (ORCPT ); Wed, 26 Oct 2016 18:52:51 -0400 Received: from mail-by2nam03on0062.outbound.protection.outlook.com ([104.47.42.62]:36964 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932584AbcJZWws (ORCPT ); Wed, 26 Oct 2016 18:52:48 -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=BEi2d4MYe6GTm7fSnqfgy667Gudcy8NjDZSImghJ8iQ=; b=rEhch7f/ry0Z2uRbL8Gb53FvBaDGvFefFwfNaRW0zhGAFaJRwI30NIqcLHgMDuIMl80yHCq6wqERmGKZavfXYkSyVmnotWMcWPgIg+Enaf8oFqppCXBA+FsGTaZ/Umh4jMLNQos/O5b1kJJlRPzieKrnoRxnvCkh+nSVqrUdkZ0= Received: from BLUPR0201CA0024.namprd02.prod.outlook.com (10.163.116.34) by BY2PR02MB266.namprd02.prod.outlook.com (10.242.236.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16; Wed, 26 Oct 2016 22:52:44 +0000 Received: from BL2FFO11FD054.protection.gbl (2a01:111:f400:7c09::105) by BLUPR0201CA0024.outlook.office365.com (2a01:111:e400:52e7::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12 via Frontend Transport; Wed, 26 Oct 2016 22:52:38 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BL2FFO11FD054.mail.protection.outlook.com (10.173.161.182) 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; Wed, 26 Oct 2016 22:52:37 +0000 Received: from MILHUBIP04.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 D3.BC.61581.46131185; Wed, 26 Oct 2016 15:42:44 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 26 Oct 2016 15:52:35 -0700 X-AuditID: 0ac94371-5f3ff7000000f08d-ef-58113164a5f2 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 44.C8.03615.3B331185; Wed, 26 Oct 2016 15:52:35 -0700 (PDT) Subject: [PATCH 04/12] blk-mq: Move more code into blk_mq_direct_issue_request() To: Jens Axboe References: CC: Christoph Hellwig , James Bottomley , "Martin K. Petersen" , Mike Snitzer , Doug Ledford , Keith Busch , 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: <32b0bd88-cb8e-754a-89fc-b1825778b05a@sandisk.com> Date: Wed, 26 Oct 2016 15:52: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: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAIsWRmVeSWpSXmKPExsXCddJ5kW6KoWCEwZflFhb/9xxjs3h5/gOr xcrVR5ksVk3Ms7h39AuTxd5b2hbzlz1lt3h2qJfFovv6DjaL8x9eMVksP/6PyaJt41dGi/c/ rrM78HpMbH7H7rFz1l12j8V7XjJ5PDi0mcVj85J6j903G9g8Pj69xeLxft9VNo/Pm+QCOKO4 bFJSczLLUov07RK4MhZfP8RYcEKkYsmpZawNjDcEuhg5OSQETCQePV/F1sXIxSEksJRJYuvc rWwgCSGBbYwSt/6wwhQ1X9nDDlXEKHGn7Rs7SEJYIEhi/e7XYLaIgKzE992voZrtJH6eWQ/W wCywh0Xi34OlLCAJNgEjiW/vZ4LZvEBFXUseMoHYLAKqEgdfbgBrFhWIkNj0dQ5UjaDEyZlP wGxOAXuJNV+nA13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pP8uGO/n0LWwW3M16bGKie8cNDZ syuImdX7wMuNCR8/9jVuMHPLZnOXfVKfLplZwcEVuznqx5Hbc5VYijMSDbWYi4oTAQnIiGw6 AgAA X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(53416004)(31686004)(106466001)(229853001)(50466002)(64126003)(626004)(11100500001)(36756003)(92566002)(65806001)(65956001)(7846002)(8676002)(81166006)(110136003)(305945005)(47776003)(81156014)(8936002)(65826007)(189998001)(97736004)(23676002)(5660300001)(2270400002)(2950100002)(356003)(77096005)(4001350100001)(87936001)(33646002)(86362001)(54356999)(31696002)(6916009)(2906002)(19580405001)(19580395003)(83506001)(69596002)(230700001)(68736007)(586003)(7416002)(50986999)(4326007)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB266; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD054; 1:gY0xNp0vY0STz+janx8Pgy8+zeUjQT2T6dsE3/3QL/BBcVLTnFlozlZvEroY9VYJQqNHzA+hShs26YQjAvrBNL7zelDGGuZFevSGEGqx/mBAbHz3ZvzQqf+7SgsNlfsntWkR6WbuFwtjFeTF6hu6sBaLNeazRk45qtELfqbbiMi9Y2ODz/Dl/tirVkmG6wuU39c9YP1mpibZXxgbKOIAi983eX/7GMhBVKVp4xU8r9coTDG86CfAj1RhqZLC6g/8ZHQeZD7fZYhDI581m6rMpE9yHfqDSwf+416FjAo+iyijUF6tIBbuGpb/eJv+A7vZR6OlvZFGJbJdYyIfOwlxUXDWlkiTAGEjCuAy6qpGSk1AgMQhA7oQrEW5S8IOzcEfin/cA6IrHrIB9EV1pPMV1xxoiWU/ymFTSLf36Lm8pH7lMJjVnuAhwBwbI4R/ognSraalZ7LBTdAoyrL/sZltYaqEWVq6ma9isoEOFsApSXC/9dMK0gryMaSjty3w+VGsup1u0Apwr1eZP54ee5so6x4elAucYl/AypS+tnwXWaORSLU9tG0bajY1Yv/auXpt X-MS-Office365-Filtering-Correlation-Id: e98335a7-75f7-4793-81e0-08d3fdf2c8c0 X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB266; 2:mEkO5qVDkhIz2z6nVTLUz3f1ifpzPY0CQ6DkNLqcHXpM1IlK7IZduflyaI403puc8kXZPQXYMPjWkhN37ES29BqqVrbSomO/fKfzK0Q3I0AS9ni5cc3TyP3cxFSazP2BUCNS3GmQ5+eGcy7PNFdP4iXzLY5q4gyFSzplsCEH+32Ctz8DqvWRYLn4LaCIkWvCsQbAF7oB327rf+pG7kxFxQ==; 3:vP8faVB1gtg1uG8W3v3LDxL7lDU4aTDXARhE+cxwonp1Ak/z5yjBcTWudZZpwqYI9p57VVtrqhJAqFWwfMAS1Bk+N3An51rkDbECvkTf54fiqKfeT1M3J2YVlqlfVpyGoYjs+xfguIYtwjhtMZw7XPPasckXFnDWLl3tne7O66BIcltlUY8ggviZ8dXTk+/5RYrZJ3gpHy/htpHPTZDJ4kz83A99P/pHCyHs1O0q9jzbyzUn99Q55IR84Ell6w702hDzrQM7aJgxfnbRG3Yk66iY4wlAj+Qx47wyzBLa+XY= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BY2PR02MB266; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB266; 25:V4E8W2Y/x0bzsLSCthqw6rz7M3LpqwB1eQ6GEL+YtVo4qLTnPBPrzDd+LxEq9wX75rHWjY6BAfNVkgna4tTYxavnpJs4IfchuzCvRjWaDqU1C/fReS7fh+wFgp+g8lsR59gxZ9mZUgBmvpi7RoTH+9lZ/MTQxtu0tl/ChfCsve9NBladi6SDsHOo70gUT72+GS24kpVf/3JnL/xVL4aoRrXFZUzw9uEwvkY4Ix+3s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aWtC80tegJ0+IOjAtYgwzPPZam1oonM3Dj7dZsE1hwYeXLbQ6ASfdWGx2PeF5ap2znzZMwq17QFkzpZCCEHyRYK5EWh4SSiq7U66Fmox1W0JLA6rgm9OUgttaHzcSnglUvC40wtSsWGK7Dav3KByMCJXeOpu8HoHbDBfXIJi54l1jo1P/LFLGuQcuJWWyx7VMkNhHCanZ/YQgv2BZDFe+VU2nBZncRPBceqO3WOdX0fquKzCaoDdAPOsIGkjogQqMcRjssHWBr/1Tw/LAvO7PBYsUn19asH45cS+6tIMnzzCsAgyQGIYcVUu4R2VOj0BvspIlrBQ5IFhksi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(13018025)(13016025)(5005006)(10201501046)(3002001)(6055026); SRVR:BY2PR02MB266; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB266; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB266; 4:cZWKbHZF71R08jAZ9G6aSkDaaB675y8z1s/3ldNdyQBahmopTeA/uMUR7sp4Hr0xSbacEGcAIlXSCIm/Cv5OoZGT/tqOUCt3qKu/zpHLCEu3wE/F0Hi3juEX3Y+EyJXbKjDV7Yp0Zae/i4rk7IdM+mxws8S/lrg0YMEAL/p148EQT1LwjaYjj9g2fQslKLoWZE4iYETTWX5C8MESJotAVn7Qmtk7V0D4Nd/LtGGTfiNWWGcmsJV2wwmysGxgX63+8Fw3mSdOMmWwM0vrXd7eLVegGmIAnnRJBeGadj9EKi/d/G5OoGOnWJuqz8c3toaB4phOiNeEqB/4L8FCpdeFuQXlKk0r2E5OlX5Yww2YrpvNC9PV2X4v+IA4agIQpGsoqDJtuynSMAwkmRQFkqrXcFOPDJqY2V27M82Pdv+SbfrAydNLsashCEs3aMLjvu84Fr0h/nWYVuJxC2dbufQuH4hEyUVUcOwlJckFsei4LyuQw/dgRHPY5jZBk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M1ZXcnNIVysxZmYx?= =?utf-8?B?dkQ3dGRKbDNOcC94UlBBPT0=?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB266; 6:Osw2b+FnjJRr4Db/OQtWiQmyLM0NPi5wtlGTxXrCXagh3toZY5WbF9QpFWuxpspFYrFMUMX2C4N22Th13/I2AeG1gGu9z1ASARgwrFj3xS899OcBGkYxvtNcQ/KuT0onbKrc3QLlBY5Ri7qyagi5FmA5bvGJ5821CVz7H6iy3XPsYCXJnOyDk4tO2ANxfxQ/SrxuOPVRPJMlYGsDViDBoNHp8HvqxcDnA3AEIJg4sg+ttp/TIj/VALd+VqzbuUCn1/VztDAL40nfdiMd/I0RU6+UvJPordM/NrCoGasOxdlqWHNoApmqsUmzmc0s0lAkHtD18f7b52O+bdklDkzqrmSVYyucSu+eNrcyMvwEFsM=; 5:oPKvCoiIhg4oduH73z0tjHRexQITkH9XX7Tqj1rkWUrKf4tonP9LymlzjiH8xDLlXp6fs2rRrqjV22L5vrzKyMn/GWgbw5MoenKRNtUr5pnjryFgS05kyi37UTLlqjojFpACMSQm9d8xspQ0pHtrIg==; 24:naCyJXCQCrPz8UW9KRcTQLRJzTGmAuk6nGWbeth294XvGDXmIAmD9zT1kSguIrrz0qmjhd+B09s3WYjCW3cUK/95A8Fa6C4nhyCLgQUrRts= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB266; 7:U708mC/mTm8P/0+/GAy+N7uhmK8XFde+ug0pIWpV9QekBfvfSQyNF3r378EW92Hh8OD1MYMI6+Kr//f7tMO6o38yVEekUxFrTaOyuLuvLppDsHJHTKdtj8JKw/ocJnvt/hdkPQ1Dfq+mSmy87Bn/7QNHPsUI336RtVXN3kmUAbwGe9Y7m/eOpHvYLEsf//BC7w9hqTzYscZzlUA96KIIWSgnphsub6KLosyEtF1JYgVW5aNInkxlaGcjDbps2vMYaJuSZkaUnAYk+G8za1hQu4CMOjXQovF7Tq9yuHktMB1uHkC6AI6/h3/0nxsLzUhfHKdhV5X790uua0Nor6RYOeOOfQ2lkqZ0Gq8xOT9QS20=; 20:gLbodQvU7zPeCYZqKNnHBz2EqvZrcIG73HM5irvbVJ1qryrANlUGSf4tYgU2yjr+Kef/y6p4cgdzbnxdPJF/vXoJliCDnbBMMSpJB+h/ixMAqIDV3dEhRseI93bHlVbHYUEvw/jcDH5Zbe00KWIr3HmLeUEa7GIxmLB7zcxt6hZp4WVZLNwvd9mkf3cmS3VIj1VovmWu38uYC8cAHNO2RVx5epAzGitxVXYQ1W263d41v4XHypPKUoFNBj2NsF/G X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2016 22:52:37.0112 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB266 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move the "hctx stopped" test and the insert request calls into blk_mq_direct_issue_request(). Rename that function into blk_mq_try_issue_directly() to reflect its new semantics. Pass the hctx pointer to that function instead of looking it up a second time. These changes avoid that code has to be duplicated in the next patch. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig --- block/blk-mq.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 4643fa8..0cf21c2 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1243,11 +1243,11 @@ static struct request *blk_mq_map_request(struct request_queue *q, return rq; } -static int blk_mq_direct_issue_request(struct request *rq, blk_qc_t *cookie) +static void blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx, + struct request *rq, blk_qc_t *cookie) { int ret; struct request_queue *q = rq->q; - struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, rq->mq_ctx->cpu); struct blk_mq_queue_data bd = { .rq = rq, .list = NULL, @@ -1255,6 +1255,9 @@ static int blk_mq_direct_issue_request(struct request *rq, blk_qc_t *cookie) }; blk_qc_t new_cookie = blk_tag_to_qc_t(rq->tag, hctx->queue_num); + if (blk_mq_hctx_stopped(hctx)) + goto insert; + /* * For OK queue, we are done. For error, kill it. Any other * error (busy), just add it to our list as we previously @@ -1263,7 +1266,7 @@ static int blk_mq_direct_issue_request(struct request *rq, blk_qc_t *cookie) ret = q->mq_ops->queue_rq(hctx, &bd); if (ret == BLK_MQ_RQ_QUEUE_OK) { *cookie = new_cookie; - return 0; + return; } __blk_mq_requeue_request(rq); @@ -1272,10 +1275,11 @@ static int blk_mq_direct_issue_request(struct request *rq, blk_qc_t *cookie) *cookie = BLK_QC_T_NONE; rq->errors = -EIO; blk_mq_end_request(rq, rq->errors); - return 0; + return; } - return -1; +insert: + blk_mq_insert_request(rq, false, true, true); } /* @@ -1352,9 +1356,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) blk_mq_put_ctx(data.ctx); if (!old_rq) goto done; - if (blk_mq_hctx_stopped(data.hctx) || - blk_mq_direct_issue_request(old_rq, &cookie) != 0) - blk_mq_insert_request(old_rq, false, true, true); + blk_mq_try_issue_directly(data.hctx, old_rq, &cookie); goto done; }