From patchwork Thu Apr 6 18:10:49 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: 9668029 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 ECB1B602B3 for ; Thu, 6 Apr 2017 18:11:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C466285B7 for ; Thu, 6 Apr 2017 18:11:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10F9C285BC; Thu, 6 Apr 2017 18:11:17 +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 85084285B7 for ; Thu, 6 Apr 2017 18:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754182AbdDFSLP (ORCPT ); Thu, 6 Apr 2017 14:11:15 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:36047 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753481AbdDFSLN (ORCPT ); Thu, 6 Apr 2017 14:11:13 -0400 X-IronPort-AV: E=Sophos;i="5.37,160,1488816000"; d="scan'208";a="9100687" Received: from mail-by2nam03lp0048.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.48]) by ob1.hgst.iphmx.com with ESMTP; 07 Apr 2017 02:11:04 +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=dTVyTzLndRauKUMR0exOZjUsuT5ZprtcAPJG5IsGk/I=; b=jia7DzguEW5EwxJxVLA7Y4oI7OowPUznkRkmo5aZ3gwcG/vpfdRxHoU6tVdvhao0yZnl1Y7d1VMQeDOgJEm1/dfYJAfWKpZhYw7UzKqZow88C5E3EwM/gGRNSQ/zOLgPErOKWRP3465l/15wSRaG+5ViVDiqRZfztfsrS+d0O3o= Received: from MWHPR04CA0047.namprd04.prod.outlook.com (10.172.163.33) by BN1PR04MB391.namprd04.prod.outlook.com (10.141.60.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Thu, 6 Apr 2017 18:11:00 +0000 Received: from SN1NAM04FT005.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::206) by MWHPR04CA0047.outlook.office365.com (2603:10b6:300:ee::33) 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:11:00 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) 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.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 SN1NAM04FT005.mail.protection.outlook.com (10.152.88.160) 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:59 +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 13.01.19026.1B486E85; Thu, 6 Apr 2017 11:10:58 -0700 (PDT) Received: from milsmgip12.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; Thu, 6 Apr 2017 11:10:54 -0700 X-AuditID: 0ac94371-41ba798000004a52-44-58e684b1b1b4 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 28.8A.18148.EA486E85; Thu, 6 Apr 2017 11:10:54 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , Christoph Hellwig , Hannes Reinecke , Long Li , "K . Y . Srinivasan" Subject: [PATCH v3 4/5] blk-mq: Introduce blk_mq_delay_run_hw_queue() Date: Thu, 6 Apr 2017 11:10:49 -0700 Message-ID: <20170406181050.12137-5-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+NgFnrMLMWRmVeSWpSXmKPExsXCddJ5ke6mlmcRBl+3cVusvtvPZrFn0SQm i5WrjzJZPFm9ld1i7y1ti+PXDjI7sHlcPlvqsftmA5tH646/7B6bT1d7fN4kF8AaxWWTkpqT WZZapG+XwJXR/KWRqeCwTMXOpb2MDYxrJboYOTkkBEwk5szdzNjFyMUhJLCUSeLWuglQznZG iflTF7LCVK1at4MJIrGRUWL7pj2MIAk2ASOJb+9nsoDYIgIKEj2/V7KBFDEL3GeUuN40mwkk ISzgKnHjeANYA4uAisSnMw1sIDavgL3En8ezoTbISyzaNANsEKeAg8TDk4eBejmAttlL/F7j BjJTQmAWq8SiFTC9ghInZz4B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filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39840400002)(39400400002)(39410400002)(39850400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(5660300001)(8676002)(5003940100001)(81166006)(50226002)(8936002)(356003)(48376002)(305945005)(2906002)(86362001)(47776003)(106466001)(50466002)(76176999)(50986999)(4326008)(1076002)(6916009)(2950100002)(33646002)(6666003)(38730400002)(110136004)(8666007)(189998001)(36756003)(53936002)(77096006)(54906002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR04MB391; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT005; 1:d8s5gTl5+ij6KNRCqSO9Ya1nzd5j3RlSmb40povlSvm28nRR13oxtY2bMMB8kA8oFnJffOZvUP8exF8zoWf9ObA3oXd6OXJHfP0HKF40LL3+6JoSbDfVONHDuKvlFLtb24T0f7x2KA3xxpGX7W7OFo2wmtCZoDKccj/fk9g1fmPov+0jHPOmsSqEwu4QHhS/piBIiawH6XCoAf2xh2JG8Vy98h/5mC0DOKyMP5LoC+mlnasEPS9b4qx+Sdzr7zAXPXh/cRQdktbInu0+QpQJ4uMrih3RhJNzi/ghgvRpZuzgahu1ys0AhIG15Dv7Fhl5N5Rphv3GkcTF/caMEz2oNkKpoxQkHotxHNUurL6cYNpqOFYM3xVJmdEKTyfRGt/jRo4uV+Qnnu2Z1dth3IE9e3qELkgw9dBWuKzEAxss3kAYcb+dGOqFAqo/es8wYW6JsyOQ9krAKRmATj8He2XRtQIfetvWZXGSe51/vbi3qq/TldfFOfWOX55cgNyKww7/1SgDlRFp4y3B5elmT7CyyQT09+pRGW2taFkmqUA/kzY= X-MS-Office365-Filtering-Correlation-Id: adf4d842-797d-4c81-277b-08d47d18476e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN1PR04MB391; X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB391; 3:pBRyzVbEU1Z8pj1/jcZBHjon1f33tswosQoVc2LNDFCrZxF1aH8jgPkJyLFz3/iYAH+gQJVlM4+z4kBAilJLbII5ruxxBzVLTBaDBXuAUzS1IV2Fwon/FM2HQhQI1svqBWgmo3kMpnHp3hjCmFiS2yb0IdUbLtcD/TBvcFvzRzczNaZAIK1wsV9aiSabKiU/c0pcjgenG7qlR4SlxTWNhX5WSKg6LJRymwVbGOz0WIOSB0Hj6DbXEpFEQz17fUkPHOrrxCiR8F681QLKGlQsGCTTjGfuZeOrB3XA+XvV0W9QdPi8tcrDFv1UCam9xHJYhoChZOrsznrZOEgeR4zA7imGtjGQfslo4L0Qq8uK+XDn2SnCLAPLd39y/moNTUg4+OyceCKbibYYVA8YxTO9SoprfZva/hsMwl20tPmlyOcWn937EwVAglUoOu5GT37IGvLfH/1qBN3RQlOvSlCoNQQkhMdvAwLZDn0xPQ6wRf5uNab4n+LAsU51RPVCt4UH X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB391; 25:+jz1iMHhQjswPtEzMcmuoWpk+dbOrYsZ397TQFdI6mJR91Mhdbrc0pMp5ZNSxujfVsvpbO5vxC1WgJOesq1ASkjt4Vn7QIoU7DouFkagI5osaAhXBrF6v3SbyDjHjwwhSvYxbXFApGx2Zdvcxo3rAv4oTn7TcSJooVC+uKd4vuY/T//WtgGsiIES61VgGTOh5meZrgw3kjhw5rfawTK2WUZdJI2kR/15bkynheX4PGU9ee6ZAqBTgzVosILRxEy75AcZZ7lEx36EpFpYl+jIkAWs8Kck636iWZb4GQC786X3PCH3Vdj7WIr3ORhig7fXaKar7FcX2Ktoafr+xBDPuecAM+sIaEY8+DywH5p7ZYpbusoimETmfKidiwaD1EptBjKBxapecZXF1gjrjOCskqks1hXZdeagTRLK9p/8/OkwP64kdWay6hLqNOzgZS3TgYa6Fue7z/r7djv0sPjj5A==; 31:DIovu3afuWQZCg/uZrhYR06KuoDTTbyR4UAxJrAUvAPFq3rd6PeL9R6THOXr4FA2ifgEG3M7Ff57thS9ihQ9ajtE8PdzHD1QtoyMe2gHj/ru6gufRko9GaYrSvsVg5fg7n57Z27MDG5lVvxxm75m2ITq5xsldEXowGReIWcwoPMjQugzn2la2qhg1XRPvbCDtI0CZrM/3rOJ5hp+JTnxByLWmeHN+TPiwGhxTFeRbXjROWYIt6jv6K+Be6du9Y17sZW3s4RmITlQgNC3cD396g== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB391; 20:XvGnc4yUk5f8yBJGoFw5dvENm1vzs+3wTOo68hyZUC1htHXMDNcKdHD6DJmDh9DZjpYbPxowhNR2FzVSgQ7VU10Ne07ppWNWEBcOmAn2hH6QV2K8PzZDfxd7LGucFnSvv1NPIWegzoqdhmN5yDoeNByeSJ7BbG4WKwLVcqHuzTj0O//YeXvgPu5kMcw6TBHF9fHonSiqglhqpbYYoyqZ6jgBXDxzAcpaoWZp0it3jBppRtlhVtB5zxo5GPtLclYGh8OO6DmgVwIwRvC1VJK5+EbDM4NQ/nH/23v+40DROG0IDmPtzcuFcHl8Q94nwisOEgYf3UWFRbLc9NcEnLMGPsjSi8wje4eeJWKrdDGZVJmuTyQlc3rMugxCvvoz4wAQ+ex+zsBHBt3TthGxf0fKS+ZdzxYAj22Kik6RvztkqZxU6HJuS0KGGzP7a49cr61yt8v+7TVqoqkXQ2mYAltC4sxtYXcn8einfNC4/oh4ENUMrw5pFGa2JeKGOpRXIa17 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)(13016025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148); SRVR:BN1PR04MB391; BCL:0; PCL:0; RULEID:; SRVR:BN1PR04MB391; X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB391; 4:hPm5+b3wRLO4jR2xckKebaoz7T3DvLO20lfT6qhOaPOYneivyVI89IVPOh2z1cs8xzt7a6iZjWdoOtgoLPrJJYimpuUFrdHaqdYJNT5t6ORG9ACw0PaVIvMQh+VPpLGuQII9NM8tCCDKHYncDHm3Ed+RQIDKdyGLQaQR5DVtIJsKcxAewWTs+uJGbhY4nycXrxOOnsXzAvb0u6p/A0kYpj8lGFyZCf0bZu+33h3P7LqA/kJTlMAmvw8YTS1ABOhYsw0Yor01CvuCtX2aa4fVfuO8mG+nIjqdAP/U1MbLzwsrCP8xE3bf/1N/qq68Ao5j3oTf+Q4I5ZI9ZV7lVWkXyw2YCf6L93eYMxhEutNhgZue3SG4+omlQpYTRlGo2GcPrN96qHnbpNzGhD+MxT18WfR1zNZ3cZRD3GzZRFbjG/uIhiqk7vDbpnhbF5jUAe608cAd6tZw1xGVwIN0i83sqYU2VPVwegWUvMvsawtothV2J/yEEcl5oVshVc0Bw6WHO5/8jzIreb9QeJrxmhQ++8QnlBUjRCoaTyU4Xbh9Zlbibut8Ra5x//mLSk7d5jeE+8Xw1MYC5AqkMHd64XulLq62i07hiP6CO9pq80lE1JzixWbdnNkgeL088al8C+yntmeJn/DNsCAs81PXxwgy898EZebaf+5gz3PnpqGCmHorJik10cfOShe0CrWJZquqaHUUKpF5IiGCj48KaZBx01WZCszs2xzH8RyyHnjO/XyPI6dz9qiWnK2CnSX7wA4OBnmhaz/TUUmIaAV3YoSBVlAprmjuRnQ7xSp8Id/AOF5eX1litd3bDbJR9cbba3mB X-Forefront-PRVS: 02698DF457 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR04MB391; 23:f4955z4WIUP8Mxc6/IDAq4oumvmeed+sXHwTmdKmnr?= =?us-ascii?Q?hlyLzwN6IXUXHt3apvRMWZ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iEkMo4KB4GhdFwpRJSROeHyzW9irK8EO4Vgv89Ju6Csqz1SOTJqOT7?= =?us-ascii?Q?YyJqchwT9+fgYg1pcvlx2JGDSdWQH5y8bIWWznwEOfPijw2XEWAs6p+7FVka?= =?us-ascii?Q?wpJu0=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB391; 6:Aw32DjwjgS20xGG0rW+CwlrKm9Lt4YCdnGi2xBHdt8NgXrhxLHfUSlWc6tvrWUBIOioqXuQpRIFheS6qNGacnU6YQGq3epthdM0cAva0CMeuQ368RBJHGlL63+EkLk8jiIRPUWbV9O6rG+D3herX/4Ewl4c5DC0PXkvVRDgyo0mZY9mhzfYwCO+vzctotN514fStGfrBRo0IV193vJu59WYvoOz74YFrX2UNn7lMMkSvqOEOKOTRm3VTM5QcOv9r2FqobmWTqEPImaGjI7i0jlY5nBUD5beEKaRMCoH8a3mLlDww+A6XP4q83bmWdYuRyrsc2Ir6IQeUXkvOEEjd95cGhGuc3KD1tOgfc9f9Pq/8Y6fU0CdtOx+Ux8bXCbcEZyES87jWL4/uPtCbZWBAXg==; 5:RLSRvqgD6uVr/dEZq1aEWiGok5xCx8onjh2dmw+sqCJlU+hN9y66Q6UftyaxjG0x8f6HeUHfvK86TCIrrgXaBEFLE5LF6R6IqKtXAraghmvFjKTOnHtOe9rXuP7aDiIdd4kidgd5++1SXI2M2Rdzrw==; 24:bFiTvL2tCTm4q/1SpWPIHBX2j4vcL16hhDKSBwMiTEG08T5gCYtW1VguIHHzsFBWiNXaAx6jJlA/80ahklNeHFOqYSdYin4m1BySMWeCCZ0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR04MB391; 7:tMC2WgNOu0UlxRLa3Utj/AmxtVi3AInjcy9HTJPm6aVDienFFgpfhn6pa1JA42nP216uWLTrA8ycfUqldnXVv7g89c7RUv0Jf5vO9gnUTI4BSjej+8jByd4WvwoF9oj30cyVIjYIpEPQVzWeQjdX6dOitE0yV/Jdm1gsFDgGQvdy00odkCzuSISHfXIIoOHBYGlbr4HxwSvB9opuDkYPWokTuZ+ooyHnyRqFvQvvEJWqI/mM9Z08RAvHa496yJZvuKvvws9bbpSNCaeTPl24wRSg4ztImUYRMLLRnbL11hHp0eK/kk7svWylM4xHdEB0XDzRY3vaSDGAIoq5TEcUJA==; 20:CT6/uJ1AtLOSpTgFNLkCZRmx8qivptH7X27qes907dtZBEP/obKN/ZWPNYMH04+1thpSTI00hi+uVaH97TqNV/LXRO1AIaIAPb1wpZMUP5oiLmyk1ESkFhiU2Tc+qnUNJiZJZQ7PrPwS+WfVm0SZZ36diawdMnVV+mVAUQVj/Pg= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2017 18:10:59.1858 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR04MB391 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(). 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 4db48ad76878..36a80ab6fff8 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,