From patchwork Fri Apr 7 18:16:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9670163 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 CC7CB60364 for ; Fri, 7 Apr 2017 18:17:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C519A2862A for ; Fri, 7 Apr 2017 18:17:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9C3728639; Fri, 7 Apr 2017 18:17:25 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham 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 51B772862A for ; Fri, 7 Apr 2017 18:17:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934392AbdDGSRW (ORCPT ); Fri, 7 Apr 2017 14:17:22 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:6314 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755832AbdDGSRK (ORCPT ); Fri, 7 Apr 2017 14:17:10 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488816000"; d="scan'208";a="8943503" Received: from mail-bl2nam02lp0081.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) ([207.46.163.81]) by ob1.hgst.iphmx.com with ESMTP; 08 Apr 2017 02:17:06 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=PgOmnMxiKr5Mi5I/ZVKKu36rlDO3t2DxjN59lZ9OR4g=; b=ND7pGwD242wmQDAJYIPNy16WudSgNl9lZen081dd0xPgGk6ubhP9owbEIPX57Wll4kWvjmpuNS54w929JlkJdQh5TydLbm24spRoIBIvDDMZhXQBxC+JmJ5E8zo9sLf24Am56I8iJq3tcpVgGGO+6BfookxBDY30Vm+zLDDlpsc= Received: from BN3PR04CA0003.namprd04.prod.outlook.com (10.166.70.141) by CO1PR04MB396.namprd04.prod.outlook.com (10.141.75.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Fri, 7 Apr 2017 18:17:03 +0000 Received: from BN3NAM04FT029.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::203) by BN3PR04CA0003.outlook.office365.com (2a01:111:e400:7a4f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17 via Frontend Transport; Fri, 7 Apr 2017 18:17:03 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; suse.de; dkim=none (message not signed) header.d=none;suse.de; 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 BN3NAM04FT029.mail.protection.outlook.com (10.152.92.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14 via Frontend Transport; Fri, 7 Apr 2017 18:17:01 +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 DE.5C.29323.C97D7E85; Fri, 7 Apr 2017 11:17:00 -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, 7 Apr 2017 11:16:57 -0700 X-AuditID: 0ac94369-548749800000728b-b0-58e7d79c69c4 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 07.62.11415.997D7E85; Fri, 7 Apr 2017 11:16:57 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , , "Bart Van Assche" , Omar Sandoval , Christoph Hellwig , Hannes Reinecke Subject: [PATCH v4 3/6] blk-mq: Clarify comments in blk_mq_dispatch_rq_list() Date: Fri, 7 Apr 2017 11:16:51 -0700 Message-ID: <20170407181654.27836-4-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170407181654.27836-1-bart.vanassche@sandisk.com> References: <20170407181654.27836-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsXCddJ5ke6c688jDA7OtbRYfbefzWLPoklM FitXH2Wy2HtL26L7+g42i8P3rrI4sHlMbH7H7nH5bKnH7psNbB6bT1d7fN4kF8AaxWWTkpqT WZZapG+XwJXRsucZY8E30Yq/J5axNTAuEexi5OSQEDCROP1pKXMXIxeHkMBSJomtfTOhnO2M Eldm32OCqerZfogNIrGRUaJxwzpmkASbgJHEt/czWUBsEQEFiZ7fK8GKmAUuMkpMOLcALCEs 4Ctx9ctasAYWARWJZ18us4PYvAL2Eqe2vWeF2CAvsWjTDKB6Dg5OAQeJ5hZFkLAQUMn+TUdZ QGZKCMxilZjf38EC0SsocXLmEzCbWUBC4uCLF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tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39850400002)(39860400002)(39840400002)(39410400002)(39400400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(54906002)(86362001)(110136004)(6666003)(6916009)(4326008)(38730400002)(33646002)(77096006)(305945005)(47776003)(53936002)(356003)(50466002)(2950100002)(81166006)(2906002)(8676002)(1076002)(189998001)(50986999)(76176999)(5660300001)(36756003)(106466001)(5003940100001)(8936002)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:CO1PR04MB396; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT029; 1:ALFQT8Gwj1BObS7v5Ux9uet7CIg5y2P5vzKd7pQ2IRc7Qb8L1eSoPaR+XvkljJfuxxAtJtUWOG6XLc5kf7sRrlk7mN6SAcdrmr/3dncr5W5JJ1u8rXYy0XPSG9bknZ4WfMKe/QbYRWeZwVIYy9xm8pdrqt/PgUassgs9iwaqBKNuI8SbnMEHw9aH7olp1l2+uJpG/sARyTWPO3TDA6ykuTBw/kX0IwQvLEPCc2/mJsKRuuWEtZz1XcS1AQWHLcCjRkpk7mIEbAFY9Cc1YnRsGvGkRL+AtnmwGTjCo2Ius2nzmKdJtPxOBAY7Il/DrBO7oJdyMZiIshxW9EGwhEUMn2g9zhxrT0U+mx4VcNYIdxBdrhorM/INvyjSMO0WPwRQua0RGowwjXTiJMrURLUHCyLDSElooznjNdeB4IPPdiuUipVLdwO88lLFsBG7CeEQ6p527AfbxVbz25BZEBotOSCi+JS3Xqd29vGKuPjYxwtKClc8yL7MAUPtQ43n3eYx2oSmc2gL8YBpPw0qc33H/XbgY785OPWkEhAVRZ6LoTo= X-MS-Office365-Filtering-Correlation-Id: e6750506-cfff-4cfa-0481-08d47de24a43 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CO1PR04MB396; X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB396; 3:nsF0ToP5q1m7nv3KCVLYZpvrzgljBu8wec03iKZJAAEJNjsLW6DN9YyxgNq7849bmGoAMF2WF+p/sMzIrCJLxsXxjt9IzZcoO9IDxSyphZMOmzbNvAbNpCqUF55KJ/y+jkZv0E5xTZHSur0p7pchO+q7y6acli2oAVoiQN672ChkGqro0ikpJszH00RNUaMRDRzCY6zLOmiWVZ3xVXhBnNhWEFfm104ThKr3fUx1S1gzQufpkparPH5Cklzr10hPPfVyaAj1MxoFjK3ybxGNBRBfI6glo9jVpQB2bfQFyGR12HmOrn0JiqmzVvCo/NijmQ6zo78jo+2HzOWOUmpWSkGXWYKsFCAFPKa+jeu0gTmYxUayrjDFxZ+2C98gppQDj+ZqjxwnnT1bykiRgCpl6aU7V1MYb1TdfbyIt3z0T5z4aiZgy25hGWxudl8rAFgeWDx8kcaO367gVDvN5vKtXVkyH3TOtb/6D8DyZMqa08NLjOdNVyicA9d78AzF4ZT3 X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB396; 25:E+cJCU05G5NBBX4ehoTtVQIrn9wEdnDT+GHcRcBKysOKLQ9vyvxCrHy/sLcrIFuz7W7eFDOgN8whSgr/ux9RcgOkuMwlU4mWNQ/JwrvfVrxVCR6nhGqbekAA1v3o1ktNnO8An2DOUjvIBJ9CmKxE0J5WVY8jRTb+xYIKkb/r2Iz1KNj5cAPvm/Nsycz+f0z1cOavvRpXDax/MaZKH0b5NblJ5BrreU14yon6TXs6kTpI5vYIyer6MyYqzZVXGDJsLFmFp8GO36PsVpFGowdzmGz2Eby/FCrx9r8FtRmCSQdf6WjQVs2thwJjyVO4oA7ulTco2tEZTksUYuh+kRvrZt+71BkFn7mm0apmepYRriEMO+gLesI+PTqRzDiJff6gc5PpM5nXhuukk+aSt4IaNxtz/vCs5VMJp72ZcsKScX4V1fnOERQjgWLV7Nk9CF+QF6XoUhjkvj0C3gRxErwFuQ==; 31:YreNbJcdtzNOD/7EuObMU5tPpbpJs2XQxlvdwT7pW9tLvvTbc+dY6Bx/5RvM6Z4jy0BIDL5Z2VYdEfbMMW5bCkmGqIbbEUGaPLqZlCrH+cdbmApEvuHMIKhPlP88ce+Ky9EjfTBzbJVL0QpyIAfQYylQRnv4635/8ZPMS4qA38lY/y+/aQlR48xxd1fG6qkc966x07x/Yby6LmA/mFgLUBTSiQVt5+fnG3YB0Qzvid+FjMQ9PL0dgBhbkP4ZuKujmRrbo7SrQr2vvxD/I3QTIDoCS0TPse+xkLsa4+PWrkA= WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB396; 20:/J73004wCOelV3yO0EkWrx6dAHZ3OQXK0PlmqrCV8HtgA/JG3ReEtu0nT91Npw+w/dl7SUyF8nj3B8DONlf9hlVNrgVcukda6qUlA0v6VVOKPQ2DKzk4a2L8wR7qMFHtgxvEGjJcSrasa2CIBRCtrleLuVYH9Ir9pS0eFaI8NqlFyHrBFfpgHUNqFrCpAc8oYiFxk3WWl+YobbKfJyjuuDHR7Io7LJ602CYRSLBSzys5HZ86TnrgAt7D4RbFPw2yXIDYLlpghmE7skQ1qqoAMWnXPbK+5TsDZwXMOe2h6WulorQdvNc1qBDHKfNfxKzqxMdfP28HjXq0ebuD1lpOgZoAdpKqJ6zBVPm8upWCVfxO3je4HYbGG4+vSoIXUqa/1jSSfk4LMtyK2TGtSIQkpIKhnVTrweKY5lSDPvWRt6o8ZjdWHtNrLQ1/PLRxJMeDdhwyfZ2JwZMtAW0W9l3lVJKG2qsmartWmm8aaNWXSOMbyWrJ8Wh2TwOsgCZ981oR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(20161123564025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:CO1PR04MB396; BCL:0; PCL:0; RULEID:; SRVR:CO1PR04MB396; X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB396; 4:5psZABb2GOHwn0Fh62zc/gVthQH/LcwpmkmFjStOWLS5f1csYBPmyhnNO76eYZLaMeXfTpOJjQzKZrNAGYUaFrExRTHY+j6sZeYALUbSSsO76srpjh784ysqoCklj4/ypBfI1GRs+4+1k0Ha1ol+ixGcc6PdlfD8sVL3sok0PvqYdpVRpEz1QQMLEVBbAg3TYg5iJTsEqNi4fGgHH/1JxkHfjvbLsEvW1zVZ0/wd15LosaFzJJmyCUwaMiSaQDB4oMW7XoH12VGbaxMgN2cs+7kiWk7v7C6ZdlE3Y+Lg5wACYzK552YJnuDcJUGUvLAsi4zvaVpgqA1ftsFQ+GQ92xlb0SMywVD+qlipNQyY5hsUioiaZUyfngucrwYbvsUcZ/7Itw09/rKFd8WVRFXRsZl/OHHak46M0ZBT0rPLTDODKB8N+dmFUmz7mX9YKLsE0RIlkSTrWG+ikt8H+77YJmZruTzHyYfF/uptqZWnM6XR+TS6+X1WIkEbE9lIGhAWwMWouPEU2cRnOcux0tuqVHA8NBzrmCd0+O/Hvx6B+RXV/tdP6659BsWC5zBLHRIZeavAjLG+YPcSRVU3MjJbtsvnw0/Is6vSyI0veMqFob+Qwg8kI014SUeipU3AO6WSFCmqjj4LlOXlT22DqX/twzbACHBC45EfA10SVnhPOfBNEYD/R0OyN48Ydqjm9C+vFoNTgtf6m5+aCWPqBXXZcqx1mIe/IfRSl+9NB+oBaSGpQv2lVJJU3h5NIHbcHIW6La0vfXuzvxm6mkBHkyMrFkmjsesaZ0NEFM3rdPB4BG7vKxeCSWsnFEKkNTD1MOQGksRvvOeV40bTMc7VKtdWs/Csbxswdb0hkIfPriKdzC8= X-Forefront-PRVS: 0270ED2845 X-Microsoft-Exchange-Diag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3WWV4NAE1eKP5QS/W3DDfbXSDDAcaWsP6L?= =?us-ascii?Q?QIY8tNl9+A1Nz+XiR1/7M7O6mhBSl/mbm1KliOofDbGgKeAuEXsXmLguLCuI?= =?us-ascii?Q?Ht7pLBt6dIOdhyaGFqm/JuS6MgvmXSaFPJQXs7lIMwNAuzSeXOHnsUzAJHBg?= =?us-ascii?Q?55uoJU0vu6jmUTJ0zutX5i?= X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB396; 6:g6Zv435pIoQWYqsztIwY/MKyhnP5naI0AWG7VvV33nAz2N96QLj3qbow9tF+/+ZOs6yDHRBp4ipcIkIQdpXgJOziICcnCcoQlgaLPeQkPoDKbz5G8ZuVyac2IZI/DEO3cwzqalnmaj7XiXdklNVna17OciArIwxxy8cHdCQqiEV5NFQlYl1OQOpkX1r8JRCh5sZY63x9CwZwuHAb3qQsdVN+myFOJo0A9vUfN7cClJOaPjSCimPfiaiqLk7uP2D4VYnRhycDlgrT84fvYUbLEaYbhLgXJ2T0kuiRnJg1yGKm+ehmlWIeMfMXBJI+aJ5miGUax88vDka2AR5NxfstcEymUquDurA5s4+SGaO2eO+q9f1sUe4mrhNVkV1kGas+L8O/5CFAKqQYKCLUhnZA6cDBqvdWc0YOrI4usFd9HPvyG/USRWxhEm396ZqYaphoGbw0e7nsfSdS+dcgxhMB0jyjCPYqcGn9WjpENxK0tys=; 5:o2EhNZnQLZ6zQN9+qXnTNNTAxqqB36CFXtZTNcQ5ZirAoqaebZVAav60TL/cnH6xWXCvNIuYpU9AzP5JW03XJ1v/LkNbDK/9YSL38xOO/fo5e8LNYVnx0tGwaYrivXWFxmGwEr8nA2iJQiUdLeygRA==; 24:zf9WLFg6iwtbQrhuPIHXAgQmPjyM7Jp/QF0wI7dNh5hcNdv6w8fCxwnR3zowriYN67fMzylsgu32JKfJDAWfWEXytv92W/EITAYwkThrH2E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB396; 7:o/w6/bhABUr7pLkRIpoHSTaysBY1osUlRkkM2lyKyaOy+gAXSMDMOUW0JbMUtSHDXB4B+26h6cS3bZyN01i46kWk72lLi54646PhT/+aRDZUXWFkaNuJ8fA9hEfp1Nv5uxRA3aYv9nTm8SaD5UGiW09Ypw/7ET2+LcxOTXR8CNKMsPpuO3fZACNcFoDuzj0quZx+wJ8Ltks4xIr5i1XP6dTzcUExNxUjs+FYjLUOypqXRGaADyZ79kupGW+9WosLDX55KDZOZ7Vvi1te1lPuVXEDxh0+U394+RkvB4o9D/K7JH2Y4MsdtXTAe9UG9N2nZungb+OyySKL1VcNaMiw1Q==; 20:kgQcUKV8YS85L5Guev6rU606r/KVIckBBc6BjLebcokTC3hTnFeG8dtB4ff4iIF86Z6e30clb7mhomYxVKBFQGPhao1+28gPS203JQ0ZPn1i3PXERVVuUbWeVxtAc2gAf04oXmo+YEQewfgtI5vNkUzxuzo+rYkfFqIzscIYsZM= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:17:01.8538 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR04MB396 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The blk_mq_dispatch_rq_list() implementation got modified several times but the comments in that function were not updated every time. Since it is nontrivial what is going on, update the comments in blk_mq_dispatch_rq_list(). Signed-off-by: Bart Van Assche Cc: Omar Sandoval Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig --- block/blk-mq.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index dba34eb79a08..aff85d41cea3 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1063,8 +1063,8 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list) */ if (!list_empty(list)) { /* - * If we got a driver tag for the next request already, - * free it again. + * If an I/O scheduler has been configured and we got a driver + * tag for the next request already, free it again. */ rq = list_first_entry(list, struct request, queuelist); blk_mq_put_driver_tag(rq); @@ -1074,16 +1074,24 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list) spin_unlock(&hctx->lock); /* - * the queue is expected stopped with BLK_MQ_RQ_QUEUE_BUSY, but - * it's possible the queue is stopped and restarted again - * before this. Queue restart will dispatch requests. And since - * requests in rq_list aren't added into hctx->dispatch yet, - * the requests in rq_list might get lost. + * If SCHED_RESTART was set by the caller of this function and + * it is no longer set that means that it was cleared by another + * thread and hence that a queue rerun is needed. * - * blk_mq_run_hw_queue() already checks the STOPPED bit + * If TAG_WAITING is set that means that an I/O scheduler has + * been configured and another thread is waiting for a driver + * tag. To guarantee fairness, do not rerun this hardware queue + * but let the other thread grab the driver tag. * - * If RESTART or TAG_WAITING is set, then let completion restart - * the queue instead of potentially looping here. + * If no I/O scheduler has been configured it is possible that + * the hardware queue got stopped and restarted before requests + * were pushed back onto the dispatch list. Rerun the queue to + * avoid starvation. Notes: + * - blk_mq_run_hw_queue() checks whether or not a queue has + * been stopped before rerunning a queue. + * - Some but not all block drivers stop a queue before + * returning BLK_MQ_RQ_QUEUE_BUSY. Two exceptions are scsi-mq + * and dm-rq. */ if (!blk_mq_sched_needs_restart(hctx) && !test_bit(BLK_MQ_S_TAG_WAITING, &hctx->state))