From patchwork Thu Apr 6 18:10:48 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: 9668023 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 22B26602B3 for ; Thu, 6 Apr 2017 18:11:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4646A285B7 for ; Thu, 6 Apr 2017 18:11:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AA91285BC; Thu, 6 Apr 2017 18:11:10 +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 8BA7A285B7 for ; Thu, 6 Apr 2017 18:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752401AbdDFSLI (ORCPT ); Thu, 6 Apr 2017 14:11:08 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:55713 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbdDFSLD (ORCPT ); Thu, 6 Apr 2017 14:11:03 -0400 X-IronPort-AV: E=Sophos;i="5.37,160,1488816000"; d="scan'208";a="111066898" Received: from mail-by2nam03lp0053.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.53]) by ob1.hgst.iphmx.com with ESMTP; 07 Apr 2017 02:11:02 +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=1/3RktUvoC0jPXlGrjkrjX/t5DiVMonw4ZOX0GLd6L8=; b=rtK79q2UKTYCCLi0GL0FEvdS6qgHcJJ5R0t3m1X/ypX0gZ4Xlup58wOtE2sjYDvdHLK/AoSUnyU/vcQHpO6LWBSmHW75GHT9V6A7azYkIBFK+pixYPCsta3Oef2fOA/7mU7F82aoiJIns8SvIHMx6mZoDytVr2z7+KBl/lB7rPE= Received: from MWHPR04CA0041.namprd04.prod.outlook.com (10.172.163.27) by DM2PR04MB398.namprd04.prod.outlook.com (10.141.102.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Thu, 6 Apr 2017 18:10:59 +0000 Received: from SN1NAM04FT025.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::209) by MWHPR04CA0041.outlook.office365.com (2603:10b6:300:ee::27) 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; Thu, 6 Apr 2017 18:10:59 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.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 SN1NAM04FT025.mail.protection.outlook.com (10.152.88.103) 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; Thu, 6 Apr 2017 18:10:58 +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 9B.A6.29323.1B486E85; Thu, 6 Apr 2017 11:10:57 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Thu, 6 Apr 2017 11:10:54 -0700 X-AuditID: 0ac94369-548749800000728b-ec-58e684b188b8 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id C7.8A.18148.DA486E85; Thu, 6 Apr 2017 11:10:54 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , Omar Sandoval , "Christoph Hellwig" , Hannes Reinecke Subject: [PATCH v3 3/5] blk-mq: Clarify comments in blk_mq_dispatch_rq_list() Date: Thu, 6 Apr 2017 11:10:48 -0700 Message-ID: <20170406181050.12137-4-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170406181050.12137-1-bart.vanassche@sandisk.com> References: <20170406181050.12137-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsXCddJ5ke7GlmcRBo9a9C1W3+1ns9izaBKT xcrVR5ks9t7Stjh87yqLA6vHxOZ37B6Xz5Z67L7ZwOax+XS1x+dNcgGsUVw2Kak5mWWpRfp2 CVwZ7+Z8YS34JloxsV2hgXGJYBcjJ4eEgInEpD0/WLoYuTiEBJYySbxr+s0GkhAS2M4oceOV CEzR02vX2CCKNjJKTJ10ngkkwSZgJPHt/UwWEFtEQEGi5/dKsCJmgc2MElPmL2EESQgL+Ep0 HexhBbFZBFQkzrbNZwaxeQXsJbac2M8IsUFeYtGmGWCDOAUcJB6ePAy0gANom73E7zVuIDMl BCaxSrRs6maE6BWUODnzCVg9s4CExMEXL5ghrlaXOLlkPtMERqFZSMpmISlbwMi0ilEsNzOn ODc9tcDQVK84MS8lszhbLzk/dxMjJMwzdzDefeJ9iFGAg1GJh3fB0ycRQqyJZcWVuYcYJTiY lUR40+qfRQjxpiRWVqUW5ccXleakFh9ilOZgURLnPSczNUJIID2xJDU7NbUgtQgmy8TBKdXA WDsn68OPPt2UmRHCDZdncwe1ed1x4xZl+2CYu8Gsr1Hn686e+k0aSs/EPi3UrZdn43s63zYu 9p/puR/a+SZr3Ljs37Yw77H88cfMxcb3+Icig0u/v7LKp9h9PvXGt0o8cKXpB4Edaefk+ph+ ixke2RWw4cptvg1FMR4LSmy5d9c/MXGIzilRYinOSDTUYi4qTgQAgyoqNm8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDJMWRmVeSWpSXmKPExsXCtZGTTXddy7MIg6ZtLBar7/azWRz82cZo sWfRJCaLlauPMlnsvaVtcfjeVRYHNo+Jze/YPS6fLfXYfbOBzWPamvNMHptPV3t83iQXwBbF ZZOSmpNZllqkb5fAlfFuzhfWgm+iFRPbFRoYlwh2MXJySAiYSDy9do2ti5GLQ0hgPaPEmTVf mUESbAJGEt/ez2QBsUUEFCR6fq8EK2IW2Moo0XughR0kISzgK9F1sIcVxGYRUJVomvuHCcTm FbCXODdxLRPEBnmJRZtmgA3iFHCQeHjyMFCcA2ibvcTvNW4TGLkXMDKsYhTLzcwpzk3PLDA0 0itOzEvJLM7WS87P3cQICY+oHYzXJ5ofYmTi4JRqYEycvPVw+qJTqjuvlXnrX3vddGJS3ToZ M6beR98qHx4++uzXSdlnJ04XTj0ir/NJXkWm09ng6J91e82l70lNOcQ4Jfq6cnd+X7LOgvi1 TQ+WVx+f1S18hekko+p9xwi2V0kbz18I500Nr37m36e3gV16iuTzBdx1zUbGj1a+tKp1y2mp 0tsZKKDEUpyRaKjFXFScCABNbDJBvwEAAA== MIME-Version: 1.0 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:(10019020)(6009001)(39410400002)(39400400002)(39850400002)(39450400003)(39840400002)(2980300002)(438002)(189002)(199003)(9170700003)(1076002)(81166006)(50466002)(2950100002)(106466001)(2906002)(86362001)(50226002)(5660300001)(33646002)(53936002)(47776003)(8936002)(48376002)(5003940100001)(54906002)(38730400002)(50986999)(76176999)(36756003)(110136004)(4326008)(305945005)(77096006)(189998001)(8676002)(6916009)(6666003)(356003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR04MB398; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT025; 1:LioNdf41TrI4Up97vcdm3Ght3WV5HA7s6igN4JC42FWhPHZkWGjvxPqXFV6jJotho8e4KW40nY9fW+2QfGzb3Y9ohgBuLfV5QkdrYJmUqUulBbTm7OQ4YJSBPQLWh10Crd7sj1XqrHSg8p61+XWmCz9W5w0/hVVcKPk0rAjwJb4BAho+i/Ol0K1zaBtv7o9BNoDHOd01iGG+l301Xr6+O+UiFlYrZkbusIGYIc0q3vuq59nNI3wzBrrPWLyuUXbSeyTcPwN0ec7t0jnMhIYOBFPG/zAPv5PbpkwfdHs/USf5aAIyF/gV1cKg2PvtoAIp7cW3HmH1WH3BmyqBbl8RCKScANnjlDY748p5ha3WK4MpTZICRjC8o6wWeA/FyYXgoxqUA1J2Clsd2WtwTij1XxW4pk96HW97YsnhRb46KZD/BdApGpeMq3MVTGBwy9NGPcOiwKh5H3b9jTqSO2ZTNoK+L2A5R2NeVaUtJqC5Qx1IRFzQhKuN30GfSBiukVxyjbKUzJgmsXuxBUWf/lxzOzmq00hPL26aIN3S9hE87Lo= X-MS-Office365-Filtering-Correlation-Id: 1ba1b90c-4772-4255-33c1-08d47d184718 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR04MB398; X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB398; 3:+dfV43GcF6HgSBgPpYgM+0rfSBx5vnMtM4sy13HM8LfDGb3YpTfrwxbpjLGgZqibwgmfLFhWJGM/5rRD3burnZ0N7cfkkqRnSA8otWsqiAKoTvq9X/hb4Gr633Cs5K+39e1mMxBvLA4KGLxlGz1DInej9KKxJyoeZmWv/jLKcnFSGponBL/dqcpRTz9UrMdweNvxEXN9W/o5UrPe862RT4/AFkW+2v7NF07ReYM+/9lsCW73b+kugE+k4zjdQ/d5nODNIc+n84GwePNBlV1j05lc7fYH7jVtpysJKiq/GUMNGjM3p2UI1d9Vg3jVYLppXQAxMKWAqckIBBa94f5mYPhru5Eh9SohOha04Uj3+12vuX6LVUTKFo/6xt2Pk6wW2uJNyhoRg7KDt3MRjacF4gVeNF3j9Zf9c6Z9oubLs03qAMWQA1DsngkROpjdBxM+swY5KvEYMZ0FVXS8Y8t8god1jH2RMTwgmB2PGzYFUV3Ak6mCWs7HhQnLbyJ5uS/nbGoSugCTxKi2recPRtGcDA== X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB398; 25:t0fi7b82qb3b+mycrRN9RPb+6MMES8jzuFp4eH/3IW/Mp3gbXdWKwvrVsqhh+0tkr9A34/xaUfaJKuKxemIM558QCHIcZibeu/kg3it30QN2dRulQF1F57CIxDBY9Tp1A2kyOEGBfg3alDg9EQXExGwgL6g/8ND2OwHkuBFLumFksyeCf4ZIpmiMvydy0yRbg8jH2HaleYLU//ycj3byV1XNdQx6engkcKpe4+BWKjPgZZEs4v7lc5QXfgh6Y5iiCagI1YvvZJw5SeyfHmqZuhJq8TpL5pgya8kaV//59GHzyRINAem2p0foLrwdOV4VbfFsT3RaZSiCdISWRi1Kp1Ly35ovCVUArr/QdZG+tiTY/WuV8dF31UkhSeVt3vzp58h7hup8BVKUamDGSKrn/ULEReadOgmlKnvpVxW1bXg2CdVZ9XSPChLYARUML3D3U7k9mvp6qOHKIchxa0eGBw==; 31:9ULejSbVbOp6U1fQAmsIOYNvYiV5Jx6Kh7vuj9zufuM4Naszy0DKSL3MPrCV1zpYRPHn6taxPV/OJEktqZ/Bwtd4uyTQFbYfijpsw3fWY9A01SrhwYIuNK6uIy6ihDZyW0mzkprmxrUJPqJ5elSUGECJr2l5R6PYz+U4runZJ1xfT61YW0gqH8XclIQCF+c56nkftqCFFAr4F7Du9PKHTEUKeECOQsIs0xwuJY4AqY2h55A1bPRDONrseyXRBFATAjiXu/vKhXr2//6jZJ2S13UicvmdgaDNLE16CkFoIww= WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB398; 20:vukT+o59s/9cvnD5PoRKMEwx3LSEzgV3svDGD68ANtsjwjQUOd1VYkhL0KmIGd8vFJwZoWVDCcXif2D/l7spGyr0C/XCl3EyWOuz0X1KoLhfHRLm2aRPXDXCUd1gFVkYCD+XDRdlGZg/A0u7z/qlKca4EfwFZ+TQYpKsd7sbhXOY7jux0jnPs76TReWOFs0YI6EZDvQSej7qH85Wuh1WtHwXj16zdg40VaE4BdtWhGH9WMh8u1yByKqwGAmNNU0CxSLYuW3vZnynowJwI5OWzMt2sCyhHs+9YXwIPB/1CgHYPg1q7LkBbCG8PI4rQFIUxmddsGAyBV5Zu3bYzcI8sKTH5LKqzfHk6t3ka6Dmn6ERX5+3kb+Rank39mlwdN708Yn++zJ2WEdwHJKi4Oy57HT2FKBvBuL9F4smoyvbp+sRiAIOAlrYrZFMz5GoiDgh54d2suF92abM0rN4UaTLZulbrhOgcVCS7i7drq1L40rV6fsHFTM7x8A8NcEBY8f+ 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)(8121501046)(5005006)(13016025)(13018025)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(6072148); SRVR:DM2PR04MB398; BCL:0; PCL:0; RULEID:; SRVR:DM2PR04MB398; X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB398; 4:AYIrVdzVr3QI7r7EWYo8WrzH+QikuPb5/YNou5tYRGEHPMa7IH76vMvANlOKPlc10o61Uvjmebi3jV70vAEgC0BJtcWSgHT6m9k3A/12JUFTSQ0gY6c9Wve6rzKrtBi1x9hvJZwmDmf9PpXgY4VxigidFfrwIYULJXtBfTRuANZTdFumiPbqSZZk8n2DMaBPR36WLqWNSexnAVwry2GB6jSrB79YZfOnfVObFuljoy+F8KfuzvHRyi0h9+nzHzrPKLw6nhZ7PJl236501FrdzZQe/6zD0pDAK8oaS+pIoROUrXRnUWtEBdjrcSTW0+BulQ+AacU1ryo2Vxq8ok0J03LRLS2/cm1pYbtsZvi4vM+A/nx8h+fnaM/HqzEQjm0saNZ0F2bTNZ84YVVf3HUq0DnxvHbHr/vjjL7aApNRIJBp5sblzcuyuZJSBv7fWbSdUVkADp6TuwhqoMPjo4Fi6JMe3QvgU58FoJUr8/Cgybv4kKQFngt0pe217zLYTqttXZsgpnmL5SEhcTgzWWcc1pvfggAEYUgsAxzeYURABQ9XkCtCDhN44B5u+RY3iiGdxCpM3oOsl5R9WSxVzE1V7GHU9LihUwrO6CSofRYDRnNPzG2aVxDn8OZecZNSFAQ6HRdlqFc7nVTpJlH/hDRTiLvWcTeSm0IxNc3SMlgByxR8oaWs2lUWv+sqzHchg301Ljo14hrVLIUAWaeDGJ3oiepK/X9doPy9LyJ6X5qwcYFTVJTWS5iCnSF7mRhttGog2LeEj0GKBLRgvprgh/NdLFTB7oZKEdOvW+j/35XNFC6UpEmoZMj756V+aTxsJp0sg9gR/kyV6EVC/HjsxZ0jgbFjNjrUbcfkUu6V7yiWCjk= X-Forefront-PRVS: 02698DF457 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB398; 23:5Umhsr4sCzcEvQF5wAX/Z6JnuqbgPpRvWPP4vJRVee?= =?us-ascii?Q?l9HaSYg0zpY6bFhlnFOv40N88TTrr+eLSdTq0a1DKhsMtj/4MFcOYGibp419?= =?us-ascii?Q?nw/KsrI2qZFYwncpCiNqV8uRyZUPqEXoc9eX/4C4QC90y23oTKfky+BBKjue?= =?us-ascii?Q?qgosv5u1Nr89RADVg42sO2zQVMQkY3ikIUfEFTKs+/Y8pUAHn7bm7TqeN9fS?= =?us-ascii?Q?trRQAZ8052XJ/gNButgBgcb2Lzu8kS8VekWOTufXcn1H1PtWrbax1r/C8g72?= =?us-ascii?Q?T2g8xNA0lhfDcON7A8C4lt3furt7/lFrHF/xrxRBLtkG5YdL27NLMyUZFG3E?= =?us-ascii?Q?PW/X4DSu7O3Z7FY6ynd+gHVYzVvdN7Z901o8GjytdkHUI7SipVLUE0mcqfqH?= =?us-ascii?Q?zfZlXQwzkBgTEMUgHfQgcVWRhctZzd/CXat0H9BFTujz91/d8G0hEYbccJAS?= =?us-ascii?Q?/AA+44mL7By0Z8sYDSjoLPqJNMUbB9O6MRmvxKncILzNZhUNHojEim4R5jt+?= =?us-ascii?Q?rrpdw7bMzfhSn47EfpFZ6ojLyj/khWUVX9TXfohqWZZbBooWAjDWiTjB96ko?= =?us-ascii?Q?NS76lGKr4l6WGqS5/rWCIpuNgaq+SEkSS75rmpAp4uDuyeVFmJyP36HgRQHO?= =?us-ascii?Q?FoDJy9T3qauhsj2TGVJxW/3wFMuR/qujxion0JyUngghFwjr8szr//9BJTEu?= =?us-ascii?Q?t7yMi/1L77Cp44ycikC2hqhEWwQ67Q2ITe3O2uvSiWwIzUNVvKINwMiKhVLg?= =?us-ascii?Q?9qJBFv+UY2aCt7q9XZvSj5kBZbhvnuQXye9n+tOnM4kN3Xmlq7C0LIAhreUZ?= =?us-ascii?Q?QJfiyXEhCVszDLqjukgHr6v2S3C5Q1hwysZA94gxniFwFkmFJ2AKobctcf39?= =?us-ascii?Q?eATy5lR0A86m8ydtEfXVKqHOQVVQB57G/6Th44EB1ivHA/7/XOMjcdu147TF?= =?us-ascii?Q?NlMefsZG44MQ/oVqOV9lGbAesfrWL7ww03un4AfjXYv679HuLK3cy6PQRNm9?= =?us-ascii?Q?ISTZpQEQxNx0Qlsenh1vSq?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB398; 6:bBS5I2/4RgxAGwfyVSMvwr21FNwa1wy31nh4oXp4gY5abMqQmbH6wz/RCOIXqYOGyd10acsuZfG8xIO/cr/0TgURYfvzWNXT8EEUtSnmmpt20bV2AdqPmvx56e8NApqmifLQ8GVqGbiozdsXhta1CLFTCKRdG7+bKqAQuMAfcXcO+O8j8E1kW/JLv99NHm/EbVjklQMSqAI+1Jz6NeQnT0HDEabSJMCswRqZsVwSxTjtwxw/oXT1a+k6mq9Dx9C2oW90PGypT4mkX/vR9AoMXnU6jxI3LxLFSvbcdCQYpMqDmnUEjCRLqZESgAgUKLu08RD3I8sjiXpnVq8rwm5+OJvfGDVtu8Cdb6EGVlmPlaBMWfC74moMcgjuMN0k/1uRzxgPVYXO6ok31BzGNUnWcal6AfJ9Ue1VrXAjQ3pHVy0=; 5:6+dblNECFXptf/orfAR6DXF9IlX0j8oF7ejz22tyBFRBzr2Y+zv7LANbGd/t8UeCoL58F+2C8OUcrYEjHcF9KPIDEWA8fiIMZUqLDUxgzOfH8WFNXsScLF4lvtL0mw0iZQ5BzPAJa6clCvAX74+sEA==; 24:sqc8D8p8tYYBXJQkjO5ciUN1fIGxhbNH5QMwxU8nbeoqyZWpTZTXL5n9FhPcrhvm0JHYSDtNcI0FIfDuPwOE68BC0qD9iIwJRWqHHBMBf5k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB398; 7:VZpuh0L4BaMO7z8gsnpQofYWFQO2FTWjZN0gvs/xsbsT0wK+14yGzBTMtSVUwKHB86E5HMEGm3F1ALeE9pMU9pQLWuIjP4eAxwgZmI12Y2VAEJz3bKO8fMn9XEPxZ/VmCir6JtUU0kaEImk42gWIiVkFMLH8yfMxZRuZewS2J96x7Nmth7zmdKOLaQwH7CTkZAJzKBkIX6HuE7QqzUbNuYwfm4q7PCB28B5RvnxxRVP9Skvf8MqQ2hXECbPVPJBecvluhr87ZyhZKCZhA1rgWPlrKC/M//3vUH9QMgf7Fagtp5RPY+0Wn3p+XYBwV5QEeec8OOo6TxGXkKj+LoNqOg==; 20:Xb/UPdOjTf38FzOJ6dqV5+0FO/1oEa1Vgm+Kwg1tvvRPE3OgVk+hcbSv5dU0ukmrDJrDS9XP4Vy4iN9hoMn+wMFTq9OEdFSY4a+KuJuvZOYBXiOu1g0AVRXP1hqhygtlVf2LReCpSJM67HJaitJKEs1LFhgyd6DzmodvX76tQwY= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2017 18:10:58.6850 (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: DM2PR04MB398 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 --- 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 dc83aec338d9..4db48ad76878 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))