From patchwork Fri Apr 7 18:16:52 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: 9670159 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 BBB8160364 for ; Fri, 7 Apr 2017 18:17:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3E1D2862A for ; Fri, 7 Apr 2017 18:17:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A875B28639; Fri, 7 Apr 2017 18:17:21 +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 710002862A for ; Fri, 7 Apr 2017 18:17:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934346AbdDGSRT (ORCPT ); Fri, 7 Apr 2017 14:17:19 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:13845 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755901AbdDGSRK (ORCPT ); Fri, 7 Apr 2017 14:17:10 -0400 X-IronPort-AV: E=Sophos;i="5.37,167,1488816000"; d="scan'208";a="9379741" Received: from mail-dm3nam03lp0024.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.24]) by ob1.hgst.iphmx.com with ESMTP; 08 Apr 2017 02:17:10 +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=zaIK2U+J+TIsO2Fp7MlU0zSAMJ8iQ/mtfQRHb7UYc3c=; b=U0oiIJa8/nhArRty5nU22eYdYO4qKzuIl4mkmbPI0uzD1m2qS1g5iBt4ytAtGoVdShSUSAGFpc9/WHCHlPpVmPGsPFlS2rK1OiJ9HVJT/w6TopBPY0/FOMI1MNm3F8sprx5h91HNPMHKKptW7niwH99bXbwyJ2/l8XM9Nd7nenc= Received: from CY1PR04CA0038.namprd04.prod.outlook.com (10.166.187.48) by BL2PR04MB098.namprd04.prod.outlook.com (10.255.231.144) 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:05 +0000 Received: from BN3NAM04FT055.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::208) by CY1PR04CA0038.outlook.office365.com (2a01:111:e400:c5a5::48) 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:04 +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 BN3NAM04FT055.mail.protection.outlook.com (10.152.93.43) 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:02 +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 BE.5C.29323.C97D7E85; Fri, 7 Apr 2017 11:17:00 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) 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-af-58e7d79ca13d Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id C7.62.11415.997D7E85; Fri, 7 Apr 2017 11:16:57 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , , "Bart Van Assche" , Christoph Hellwig , "Hannes Reinecke" , Long Li , "K . Y . Srinivasan" Subject: [PATCH v4 4/6] blk-mq: Introduce blk_mq_delay_run_hw_queue() Date: Fri, 7 Apr 2017 11:16:52 -0700 Message-ID: <20170407181654.27836-5-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+NgFnrGLMWRmVeSWpSXmKPExsXCddJ5ke6c688jDPZdV7VYfbefzWLPoklM FitXH2WyeLJ6K7vF3lvaFt3Xd7BZHL92kNmB3ePy2VKP3Tcb2Dxad/xl99h8utrj8ya5ANYo LpuU1JzMstQifbsEroxT7UoFzbIVp55OYm1gvCfRxcjJISFgIjFrXiNbFyMXh5DAUiaJ123d jBDOVkaJZXufAGU4wKr+rC+EiG9klJh86AU7SDebgJHEt/czWUBsEQEFiZ7fK8EmMQv8ZZRY s/oQWJGwgKvElHkn2UBsFgEViS8z3oDZvAL2EueuP2WHOENeYtGmGSwgyzgFHCSaWxRBwkJA Jfs3HWUBmSkhsIhV4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PAttributedMessage: 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)(39850400002)(39400400002)(39860400002)(39840400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(4326008)(54906002)(50226002)(33646002)(1076002)(106466001)(5003940100001)(8676002)(81166006)(8936002)(50466002)(356003)(53936002)(47776003)(77096006)(8666007)(38730400002)(110136004)(6666003)(86362001)(76176999)(50986999)(2950100002)(6916009)(189998001)(36756003)(5660300001)(2906002)(305945005); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR04MB098; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT055; 1:hbccHVMaKD4MqK1tBgwg03bek9rO2z3B+qMUA3aNqfLtdhV/X7lfzG9IS8a02vYBaazwcSFrXWNgUz6cnxbEzwI4yoebxfcn4VHHMo/UY4nMgISD7zs/7f8+J2FckujiWdQNvfWUzp4zd0VAsjef026easRnPGEJ2LY5wMQ9hfNAurlcIhFoxK3pIWeDnr3CUysx4F/fafgNqqSxNB8XqHUSglZdH8d+UH7riC1MZR1W5bC10/oB+ur4GnzpHmk0r/RU07hBf+MEqPdrb57VkBh8OSZnmErC5W9Ygh3Pt4BYoTiLen5StUk28Su2Tv9pHhBcpULxlkFu2pqCIbQn91arX1584/3IoolmCTODewOlHt7h70t8inZzpmgYWyqMZ558d+SqOo8aoAIkLowhJ+bzQkbej7f2oqy6TqjZCQY0wmVvKRiSwML1IOljG6OrtuKTl0L0OInMctWZBsK5s+dYEyak5PnxbngsF0yEAeunmOdiptyx3lIePvOvcfrdon3z38bTkLRNvhFg8Ye3Sz2QEZP3ulhZkNF5JQsMzSc= X-MS-Office365-Filtering-Correlation-Id: fd5c2b42-5484-4cb2-970a-08d47de24af7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BL2PR04MB098; X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB098; 3:iNDM7ib1J25dpfKdY4RAA+fj12F//nQTYoPWS4mtM+LfUIR0+IdeDQu6Q4wYa15sUj32rbt5KZeUFPy8lNetTIIsB2yG3oQvEn1/uVYQRoRwzTX6zTLjLmIhNB0b6I5eP7EX9q+1HT8qWNj8tejcI8B5v4fdpihbpgjQSYQEulqhozK9RBtifyj9NPbeN9lh2m8gW+iYHsq+c23xQp3yCn6dze5ec34IRVojpMPpU27O1egmG+S5tisExwwZmTtCu2OZum7Hd29YFFYPoN8bXKlDY0CjzzVT7GdTjL5IURbMVoAA+VyCx37yAyEIuRBVPJqwQrmsSafDWoyEtngsL4BQGOoMiPiuIEW3z7613zjgCrKH+LQDhR5eX+XE7DUKCp7ORLPrAl2LpZRS418sZh5g2qxwwWcGEhL2HngO/Z2whrdP4V254O8QpVR9iUHKhSc64Obu6BHqnbuKOCaoWDpfn2XKDu9IWiqTKql6OHoUqEv39Fc+mYW2Lj4ovAxv X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB098; 25:2pVhe/iZFFlXYcwE20F3M3qhd6lquLf3e8OESfYamNq0yuc/QMX4BCXTlyoFtIeqN5B0lbuRiklWlLrZQbjrj+h7My/s3vp8mHyigbnMHPcJsaXtOAsm3I0azwKiMsIQUOTXoVg/hr2mYowu+6M7I3IPCb6A+sZJDzSTDW/HcUmKPlyWuVsAFiMGyxkXG2aPAZmW9TkGsbmqEpBGJomYlDxWn8Koj8jJUUlfOp9iRIWOfBHvEZytVYsgC/p3IabmA8julnyo43RD6FS76IxKFYfMCvG0vaTwbo8RHM0gnhbZXkd+J2l2L/DTVSqOacRJ0thhejzLLIoSTtK/g5p7URGTPcUa834ttl4IIUV0/1V7DUBeH3uJEF+uJ8V9ouuZUv9kyLXb1S/97wXgCpTxYg9WVn6pO0akrtfLoId2UL0JZvRoc+swxgIYUPXJqOajuWEYM/jiF8iYXnQcm6kNbA==; 31:3ao7vBfvDbXs7sZgmiSSumEG4oF0KgdnZomjXIfJDg8AxrovmuhD+ZD+Zkj+p0Iux39lV0j1v2YdZ8pRF4X7VDqYp6e/pB/HzqRA3bkkLPK40nUeYf6ki9cfsgsI6JHILQdK2naDYg6mHd2OkdB1SDQwZ6hWT8jYJm5OEqRQU+nKACf6d35Oo+C4qTTpA3LzFL+8UlM6F0LbMTt+4XxZVp1HJBX2b6jvxJTuk3gezxNXZsGoxmdD9oXcyLR0nJz7QYuILHK8UWnr1gL3vRMEhg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB098; 20:BGWcHNgfB/Q8nnyhdZ7aofiBCx7uQ4AMP3VO/klRttl+AHeZE+GiuBgrTQ8AcnwpKtN+mtQKQ7kCdTe2g5/PkM/pvLnpefJFqGJxMVVrsgZYAhDZIrchizJgBX2H48pCtszNWbn0JfQX6U0iDVgEhU7gYPIEMdQEI07bOB4tAW1HaY2bB4/IWbKLSPSrk7Fl/gVSsRbVBmLzzAFOD6dInzTy6jNThjAhWmrPeYtMyZwpFoe6P2D2dyR/tJrkPEcJVyaBcfz8192e1QgEf0SWVjeq6KxjpsLNFKpLKeSDui8dT2/Unt4QR7QWDIvPaY9CReSNbkSrifR1KMXmchvtmlQ8v5pnErb4KYhb4fKV2fWAz9NI4HHKhtABhgCFGUHv7fzdPRfhtLHtscYZmkhEeLJfd0cSBDOjtcBi2QyBxXxjMKql73jH7dF3r0t8qVKQRTiUU6V6ySFbk1mczVnjwpqIucGmrMIGQbqYkiIqvKiPqkD9dSDVbKOtsBsuI6q/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:BL2PR04MB098; BCL:0; PCL:0; RULEID:; SRVR:BL2PR04MB098; X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB098; 4:SL3I5U6fVZCS+qv+5PTbkgAN39Q6sZqZkbOil4N6NQj5O1kXAWIGyHwk8cLNV3dvzXTSJZyh5tTaPXNipqbEYwTsm04lU/aysGRsbJSMgxCai3y4DlgkWDQfoLnU7rUe4oNPQVpR13+onxTUNKlaE2a2FVdKkueForGyewQ2YyRK5kocKfRcKSW2oKwPKTsNx9S8NXo3ilsiDNEywQqd/9B0a6cVrSj5AErBdP7W3SL+CRC1qPYxXc5FSUY8swxBlia1eCHi6Hu4i9xRPyM8wKQgah3MmmGf+zF7+EtVbMZSswtTmLLEiLHYWKrzmtuCmfVqpHwLtz/jOFXAqcG2ZcfQ/fvxIMD1omprg7oPYnDAvDR4w9ryCNFkLUMj00WVzlR5JUW3mpjzQqxHwakXyMuzt8a//1vXzUqrdY9gM1xMJ3luksrTue4ycX5NgEObg0KhrcjEoagQFTfVEKFHbLEtYqEwD6zNCPJ2iDscmRCWkicGQ86OHBEjlGU6VXh9zTS5T1NN8HUjexDOYNzMZr913/T4MZhNDys5CWteb71Q5iWsCUIuR42C7r24mhQg1iHmoPp8xo/TyhNSmcPEk8D7IKb3S93KNz/kbkFakUB+zNC7+Tu3oPXbDOrG5Jh0hUylr4pvgsM0hJLbzYBhT2pEUc6NKTSWbstd3Dy3rUMdxSP4UJomKu0fYpOxV0q0ev7iJ/nF21N+uQKLtBJHOe4foP9U2hUOxoFgl7cMPEzGbt2fAx3b6DJfERc1nLl1NHetWlq62sgZnD0b0JY7bsQ1z4YlAafDJHVuIgLJYfUt4V3Q/dgKVsQ9bZ29OiYM X-Forefront-PRVS: 0270ED2845 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR04MB098; 23:jBLr0uaz+BJH2ZBwi+Tienl5b31mY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wuzaMLYp9V7mLyzICM5kqMv7yH0ruW4XuCRjBr+uEHIZ+?= =?us-ascii?Q?XmGzkZysXpNbWVUjkgZqMjYsE305+DTU8NbWk7JVVlNHwYIZ1yZLD4RgJtYL?= =?us-ascii?Q?vXSSw0NP5Mwz2YhhCA/EhoXHX2WZXUg9VY/ufDi+cCkw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB098; 6:gqTnHiBmuNe9B+y1982daqMnvDzYIjmcb4fu5XI20KTWM++ywTyOAxlnEjzxVkk0MjOGzyEq3ZBPKqxFl93vdfnaaM9DUzeHD9IrChk0YR3TmDnsCVArvwY/Y7pcKAPejquiypH+mQ4xtYcok30nmfODx0JA7vPsuL+ZpYtk6UEz7fAQRwBBBlf/vmDbb5qFa8evYbKa8THd+xXX5llL/90m+i26UN0h4Gg8vrRL6vfwcZ5CdSoCFOew39exBuPyLeTiNWN8OIsfpvQmfbWo80ytXyq88k7HlpThlkUvM0RQn2F7bUZqFn3AeD7TH/9HzxNP/deeN89ylDWURigaCT91ueepw7OuK69UlNTZ4l11OaOK90KA4W/aP6abg/wnLISlWq5C4ziRF9oVzv5NbwwbgWv2A2Rv+eCSN7x6hZYuqXG6tpkk+qtbm82kb0QyLROMMwni3hF1jANYn+pONOTCMpX7TspwSgxawDK8M/I=; 5:2yjOLOrDYQmw5C6TbRPjoQ7q8jRZO+8vt9CLU5JI7wyYYY35/GWidrWzybOe9/E4vfH3IqTAAaecq+gFUpnF09hwaP/IqF6JDaKaENN/7lx+indYA0bNVoR+Ih+8ROmGIFuZKDd3gBPZedXYvtfMxg==; 24:nInX+m0IhV9bOE49Wo5fsXkYguLGIRK/GI0aBzMy6mFL61jI1BXJuhnMBqSueGCUVVF1h9aLiMPE3K4TeTeBzHhcBPfhFgoy48sf8UmXPrU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB098; 7:WBAyHzuTJgmrMaFr1lEMbT8g4CqSNw55fZ8kRcaJ0HVDx9DuVEVYmo//9AMksRJf3tNgYH/xfn/LZG9cnxL9w9qM51rhBU2lk78SzxHh7DnC/oZKlO0cd9kmpfpRQFLhWt+NeisEvwQ/zhQt+5k0+bemxVpXRsdEFuszz97MWusEJO5fqQ8mDNQzttJYtsi4dNOdJ9CowYDE/wy/8VGROxuPMkvB48FPnvCAoubY5IbEn0h2wqK7wUEITDr42Dh9qR4yYUW/n4ZXSSFCCb9OCGnK+9Rn7bHWhp8QCZD3ADXVhCP4SN06luhq1lf2axBdrnUqR13ObG7HUfLeplhi8g==; 20:0JbCtEYoRC301LuG7W0quCoqC1C5ueP37AMNXsws9TSMCzzQShOqGWsWtkYjyZo7dBo+oC0yfvPIzJ7IqE71nzHLcnrCf2tkcLeQTM1GEhxrSgiLccat2A+23ZDQYipUzZL258nDo0Efc7QLgya6AP87Ep7EsIDAArS4rqQMHHY= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2017 18:17:02.2715 (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: BL2PR04MB098 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 Introduce a function that runs a hardware queue unconditionally after a delay. Note: there is already a function that stops and restarts a hardware queue after a delay, namely blk_mq_delay_queue(). This function will be used in the next patch in this series. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Long Li Cc: K. Y. Srinivasan --- block/blk-mq.c | 32 ++++++++++++++++++++++++++++++-- include/linux/blk-mq.h | 2 ++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index aff85d41cea3..836e3a17da54 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1146,7 +1146,8 @@ static int blk_mq_hctx_next_cpu(struct blk_mq_hw_ctx *hctx) return hctx->next_cpu; } -void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) +static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async, + unsigned long msecs) { if (unlikely(blk_mq_hctx_stopped(hctx) || !blk_mq_hw_queue_mapped(hctx))) @@ -1163,7 +1164,24 @@ void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) put_cpu(); } - kblockd_schedule_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work); + if (msecs == 0) + kblockd_schedule_work_on(blk_mq_hctx_next_cpu(hctx), + &hctx->run_work); + else + kblockd_schedule_delayed_work_on(blk_mq_hctx_next_cpu(hctx), + &hctx->delayed_run_work, + msecs_to_jiffies(msecs)); +} + +void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs) +{ + __blk_mq_delay_run_hw_queue(hctx, true, msecs); +} +EXPORT_SYMBOL(blk_mq_delay_run_hw_queue); + +void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) +{ + __blk_mq_delay_run_hw_queue(hctx, async, 0); } void blk_mq_run_hw_queues(struct request_queue *q, bool async) @@ -1266,6 +1284,15 @@ static void blk_mq_run_work_fn(struct work_struct *work) __blk_mq_run_hw_queue(hctx); } +static void blk_mq_delayed_run_work_fn(struct work_struct *work) +{ + struct blk_mq_hw_ctx *hctx; + + hctx = container_of(work, struct blk_mq_hw_ctx, delayed_run_work.work); + + __blk_mq_run_hw_queue(hctx); +} + static void blk_mq_delay_work_fn(struct work_struct *work) { struct blk_mq_hw_ctx *hctx; @@ -1866,6 +1893,7 @@ static int blk_mq_init_hctx(struct request_queue *q, node = hctx->numa_node = set->numa_node; INIT_WORK(&hctx->run_work, blk_mq_run_work_fn); + INIT_DELAYED_WORK(&hctx->delayed_run_work, blk_mq_delayed_run_work_fn); INIT_DELAYED_WORK(&hctx->delay_work, blk_mq_delay_work_fn); spin_lock_init(&hctx->lock); INIT_LIST_HEAD(&hctx->dispatch); diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index bdea90d75274..b90c3d5766cd 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -51,6 +51,7 @@ struct blk_mq_hw_ctx { atomic_t nr_active; + struct delayed_work delayed_run_work; struct delayed_work delay_work; struct hlist_node cpuhp_dead; @@ -236,6 +237,7 @@ void blk_mq_stop_hw_queues(struct request_queue *q); void blk_mq_start_hw_queues(struct request_queue *q); void blk_mq_start_stopped_hw_queue(struct blk_mq_hw_ctx *hctx, bool async); void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); +void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); void blk_mq_run_hw_queues(struct request_queue *q, bool async); void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,