From patchwork Mon Jun 19 22:07:50 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: 9797953 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 A907160381 for ; Mon, 19 Jun 2017 22:09:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91BE326B41 for ; Mon, 19 Jun 2017 22:09:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86AA6274D0; Mon, 19 Jun 2017 22:09:01 +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 D481526B41 for ; Mon, 19 Jun 2017 22:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752681AbdFSWI7 (ORCPT ); Mon, 19 Jun 2017 18:08:59 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:20541 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752448AbdFSWIT (ORCPT ); Mon, 19 Jun 2017 18:08:19 -0400 X-IronPort-AV: E=Sophos;i="5.39,363,1493654400"; d="scan'208";a="26617570" Received: from mail-sn1nam02lp0023.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.23]) by ob1.hgst.iphmx.com with ESMTP; 20 Jun 2017 06:08:18 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Rf6du6rioBNNh3QA3jjid3fgC9HYUCeJQvDkDQOmZ+g=; b=UmcVgd29EEPx5M/KQdK21fsecNIsJH3VUwZZV6x5R0elHLgAnK7WRr/d7E7jgwBaPPORwHdNExJQGJZ9xWL04Wfx/q5dJpOmE8oY8zAyRHYgT5rlEPuT8hGPldbB4Z6SbGOYBwlOCAA03AgcnO4gKwvkNKtdeZAOqhKEgGt528Y= Received: from BLUPR0401CA0012.namprd04.prod.outlook.com (2a01:111:e400:525a::22) by DM2PR04MB541.namprd04.prod.outlook.com (2a01:111:e400:2430::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Mon, 19 Jun 2017 22:08:15 +0000 Received: from CO1NAM04FT033.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::205) by BLUPR0401CA0012.outlook.office365.com (2a01:111:e400:525a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Mon, 19 Jun 2017 22:08:14 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.21) smtp.mailfrom=wdc.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; dmarc=none action=none header.from=wdc.com; Received-SPF: Fail (protection.outlook.com: domain of wdc.com does not designate 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 CO1NAM04FT033.mail.protection.outlook.com (10.152.91.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1178.14 via Frontend Transport; Mon, 19 Jun 2017 22:08:13 +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 81.03.02805.C4B48495; Mon, 19 Jun 2017 15:08:12 -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; Mon, 19 Jun 2017 15:08:09 -0700 X-AuditID: 0ac94369-9c18398000000af5-27-59484b4cb433 Received: from exp-402881.sandisk.com.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 35.4D.11415.84B48495; Mon, 19 Jun 2017 15:08:08 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Bart Van Assche , Hannes Reinecke , Omar Sandoval Subject: [PATCH v4 01/12] blk-mq: Reduce blk_mq_hw_ctx size Date: Mon, 19 Jun 2017 15:07:50 -0700 Message-ID: <20170619220801.12557-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170619220801.12557-1-bart.vanassche@wdc.com> References: <20170619220801.12557-1-bart.vanassche@wdc.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsXCddJ5ka6Pt0ekQeM9PovVd/vZLBa82ctm sXL1USaLvbe0LQ7fu8riwOoxsfkdu8fls6Ueu282sHms33KVxePzJrkA1igum5TUnMyy1CJ9 uwSujOaNi9kLjspXTHt8m62BcZFUFyMnh4SAicSOn81MXYxcHEICS5kkGl9uYoFwdjBKtB9Y ytrFyAFW9XFfKUR8JaNE97057CDdbAJ6Eqfm7WMCsUUEFCR6fq9kAyliFnjEKPHlUR8jSEJY wFpi0vbPYDaLgKrEvqm3wWxeoHjz4UfsEGfIS0x718sKYnMK2Eh8n7wTrEYIqObz+wmMIEMl BBaxSiyds5YFollQ4uTMJ2A2s4CExMEXL5ghGpQlzq99wjaBUWgWkrJZSMoWMDKtYhTLzcwp zk1PLTA01StOzEvJLM7WS87P3cQICfbMHYx3n3gfYhTgYFTi4f3x1j1SiDWxrLgy9xCjBAez kgjvFymPSCHelMTKqtSi/Pii0pzU4kOM0hwsSuK852SmRggJpCeWpGanphakFsFkmTg4pRoY +1fvOOuRt85W4urN6POx7BsN/rJzhouJLks+72S+3NGfwydoMW/3gaWmxbc2H5k4+/fqrN8b 9lnwXNHonuLX/njd895D+/3dhBY8+5AdnLy06aZimdvhuaoavm+TbyyxvJu3Z6c0zy/jPUdS 2R8d33Z3cWCgQZ345/9X6noqNs9IfLgo29/5lhJLcUaioRZzUXEiAD5qPrJyAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBJMWRmVeSWpSXmKPExsXCtZEjRdfD2yPS4Ps+FYvVd/vZLA7+bGO0 uPTnC6PFgjd72SxWrj7KZLH3lrbF4XtXWRzYPSY2v2P3uHy21GP3zQY2j2lrzjN5rN9ylcXj 8yY5j/YD3UwB7FFcNimpOZllqUX6dglcGc0bF7MXHJWvmPb4NlsD4yKpLkYODgkBE4mP+0q7 GLk4hASWM0r86LzG2MXIycEmoCdxat4+JhBbREBBouf3SjaQImaBR4wSXfN72EESwgLWEpO2 fwZrYBFQldg39TaYzQsU3/7vKpgtISAvMe1dLyuIzSlgI/F98k6wuBBQzef3ExgnMHIvYGRY xSiWm5lTnJueWWBoqFecmJeSWZytl5yfu4kRHDackTsYn040P8TIxMEp1cC4RiX6y73765d/ sLqsyBF4eFbwJeeCjvWXw460tyhM6zpym6ch2z9ca/31gv2fnuxe+frfNImIbXrf5/vKOU49 bVe+yKP/VSajdO7TpYJBu9881wxlN3sx472ayIv83OoW3n3nfN/5brnxMNP/q75vtmXYxBwl x/n/Tr+sNu06Vi6z/mIC21J2JZbijERDLeai4kQAFjvuRssBAAA= 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)(39450400003)(39860400002)(39850400002)(39840400002)(39400400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(6916009)(189998001)(2950100002)(72206003)(76176999)(50986999)(105606002)(305945005)(1076002)(53936002)(106466001)(6666003)(110136004)(478600001)(38730400002)(86362001)(36756003)(50466002)(77096006)(356003)(81166006)(2906002)(8936002)(54906002)(50226002)(8676002)(5003940100001)(4326008)(85426001)(5660300001)(33646002)(47776003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR04MB541; H:milsmgep15.sandisk.com; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT033; 1:xbioXmpn85IyAbarcid+IaoTzOHKjvh2foQExtx1WyQAaXd3GmYWmmyapPB9V55Os1Nz1yuKwcVXY+PMDKTz4jOj4iuKJpDGaCAdZ195m91EOGugTjId6cCIlF+KYcJoeMyp9V13VHGEnlY2pNlxYsVuknxedL1tLK4fFTvw3tHj31DWHTc82TEN3+YZWS5yK60RtIe7RFCTwLqeard7QUaW7pR7wrK2b2aLWbbetcVC3uu1KYIvrTqKJ+bwcYCmk9JNsq1pjTQeNiL6zFQvc9Kd5KoN9b/bGDbfvZplOFO8sd2q0aQni+9OKZlDhSn6KMzYiyRUwd2Y8BqQehdcWuwqbXOXmHNv1u09rxd/iVL6DU6xzP08AN3FR2aUXhiaaXbTVMd93UtYe6b65I+GvQkMhvparolMY6ejrxO7OiDKFU/aIck9+LnQiea2L6+B/BEkCpC6SZsCRBD36SqIillfPhwryJNOjOThosERyN1uePJ2papWLfd/GYL3Gev7i7SUeQqBXaIOUa61RFQB4yMqKjFIwfCunUb1Luy0EcYOlkrtYJTNwKMcRh9SoidF X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR04MB541: X-MS-Office365-Filtering-Correlation-Id: 5ae180cd-fd40-45ca-ae51-08d4b75fae6f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:DM2PR04MB541; X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB541; 3:2RdpuOuPCZ7h02LVclDdU+odsAgnDBlkRF0Rj1f3/sxz6JnMnJSMPbzLwG/y5VwjPHbCxsQZjBEakcb39xyMhZPBge+fxrDDZmDIO9uye+tGC9BTxfOGTiZITBEKmHNuiU0gMBgv3dhX1mFIqbHXQYFHvFu2lW+nFHWdzjKEKGCwCtom42S1hhwxA9j/FYm2RUYWN522HN92Y8o/I21MCK+3klaV4skItMOg9loeN3YuCAMW2hd2tghAVZjWHoIqGMkuXOzpkUaYxUueOWwBLV4gUBkBgwMy4wpuauXMdeOc/BS9N2pmGGfz95J/ZzRSwy8PoikQrs2HbmSNqmm4hihMPKIWjzC6kWdGUSU0g/AG2iTtKnyoPdk4kLOmy5nXCQAkdkU8wXLAQPw8qOc2UgLEhIWUcgyYTCty6NvK290tyzkNqlB9PlvkYVln2ItRrX9hcgM3Ogv53EnSxEqudg== X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB541; 25:YdLaqJ6mSgNuqHBKeuypkRAUxFPColN74DVOFrJYCUc9lXbsogsMJq+y61wQJWT/X2vA2e+deQ4tsi5bshPt+7GFTed+aRkwo9XF1xGDoaOstUWVA06eZAYvVyZUll8j1wMHBe7uPdqAPDeHbX8NSOg7IGWO3Wp7rna+ogB4Pdxyu7x+dd4mEUfNXFcWGgh3dkgf0Vpym8nkOSnBef+tTX6rZJjEdfxzmBc9pxg2KyeBZdLGfttvLg8psbS2K0YZrjrc07JhJOhj5nmgQ61+TXjnslnJxVqJfly5mA8LjNXvC2MrFXJwJuRxe5ku8n5H5hc9E5iIXE4PIPhv9GUsa5kyqFQVaI11OrjrXKrEHRcgRN1aBGigF1XXwMZ3OsBFbQ4XI4zLuqjEulVidOufKl5bNcGeRgMcmo+Be8LFa4fOHlVb3uHBNUReFZL/OGIGti2iXhx74ItVn6z2J72rIjpECr3DRz1YZjufRmAY5oQ=; 31:kPl90MBzdk5/md0yL/SZ3a4HhCeEr9CtH2ES/sj+DwTZM5cd8fh6iXzUF+8RIPGTdiy+7NmaT0IebWaYc3+qK4K0CSi3HpBHANpqP1fy8xTYno6Ax5yC+DsUTetyT6jcdj2VvDGlYBJPdmmBXSM3EjCfHcZlkNIZABOtEcSwHmjZGxoO8T5gpxm7P7JcpEt6nDHdWM790/saKctF8+OAjBncLYdKQZxXLzcLVReXnUdZuPaXMFloD3ei+yz5BtIpefD2IjhhlF27Z6ApdeYipQ== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB541; 20:6IV90QI/jazd1SWGtoPAnlrKXoNqX1IyXmuWpW/NPT+yGep87cmwfmjJGUEtDAR/T7ns1KdMZwqJyJdA3MY4nEH9qx97yLDxvDUY3/V8rEBOXaQNs4cxNJGMnhBtLDypqRkhz72Jf2asL2jdLFQgjJxbhfMvVs6BF0IQiiwSDmIk9hX3kMpj+NAsZBqNjql0zhLKUdb0+4H2V3ncvoTGMMtKiDzmuJ9NtSfaEJsXKWdggNNKJ0lgEmPivVlfcw+xv9CMDUO8O27hUDz22p9BH9tuTeYBUouRiZTgRctqJiEIWdiKqOFQ7HOcVlM7suK3QfY0y3CC6nt7H9wrQNeXcVNwRh58E7ggusu/86BTiuJrJtG+jVwCg7tynIRRKmMCXZNjYqs8+HrOAMeufMVkMRdS8DwUU/zMVysIhrPDePReMqjLr59N4jAqVakrzVaE7UEkjy7ihclOG8uhP+2UOxV5TfNT7zkKIlpQjfCG9Zi1xYADNh/FdQOrr0XjpZW0 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(93006095)(93003095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR04MB541; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR04MB541; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB541; 4:WEDZ2roX0tssS+eEdUEVENOtxD4a/fYEGwceQyiCXBC?= =?us-ascii?Q?fpKL7Cmx6k4bocjXhlwjt+dhtBbSkfM0/810EOyEB7mA9oo2DWItsIEwloWl?= =?us-ascii?Q?SchenmotzJzVLAlhAcx0BKExsJbBGw6bCZSNRewHLO3AYBvMlbJ8shPv8MFR?= =?us-ascii?Q?s30btiPbTSXmSLt1dLAFwPOnqRGJpYp+89I5YrRJk6MRKYI7ZjQ/D6oMmiBa?= =?us-ascii?Q?ZAkZjE8AfPCQpwV1h2Ho8S0pDH8WiyrziJhWgJ8qbrpWEg0AzN41We921voa?= =?us-ascii?Q?2V77FsCrru4ES09CqJVKAfTsNgvgW1AHZJtNAIXj1f6td6K1xUci+udjNIOT?= =?us-ascii?Q?idO3S8rRc3HiYhWPhhYx92vbv/fwAjgLOj2MnK2pPtoeUpy3F9vnRgwItm1j?= =?us-ascii?Q?Uy9O+AZOtaroFoZR3gqxL8BQNp7+VBfWgPKu8DHgzIVrn1660TPx3y4wu1Jq?= =?us-ascii?Q?pCo6v2fDe6mJf5uOdnCsQcabwqS0DDNBouSmKm75PRpj1blVECaMB7jvqVsh?= =?us-ascii?Q?pKUU+eiOcpuB562YpgZ3G7pjsnp/Kzjdw1EcndjSq3garz7CHVde6lt06dKS?= =?us-ascii?Q?qbBTBo060ooXSxOFAML1Tmt4ocrvdqaUUq5ENV1/6Qyio2XggqAed4yjkDeE?= =?us-ascii?Q?6W9cJZxRIh8Qi5sJeoYCafoJMGFHChrbGfNbpEDqa32mKYDgjjFwKlvMVVoj?= =?us-ascii?Q?Jg2O19dUruirWKKyV9DiuOMDtLw0d0E97+BU68Pz2qOdy79hR6/ePK6fYQUI?= =?us-ascii?Q?xslGBc7W9EfnJ4lc+2WgqL4+/6WudjTgNC3ZqYnAW+2BUR72qGq0EcKqYEF0?= =?us-ascii?Q?76En/Tzn9ajbzdIP88qAMnSNNyAUyMi8zwUk7I0ZP7uv8gxdq6HqgxCjSkhL?= =?us-ascii?Q?ysQvC9sVwgMXnIzVSM2syFtB0+/oOXXcwNSxPQkhDbqmg18yFiCJXpOSjrDb?= =?us-ascii?Q?Mtgjdn5C4g/QyBFQhaxHwSbiOtpyGwXW9drYUVEH8Y2dgJ9N0LoN1k60h902?= =?us-ascii?Q?FdaNoU6HDUmDeZ7rFa4s58j91C2fbCoLgeUEhOZXZXGenzv96R5TBj+7ZkNA?= =?us-ascii?Q?dggcrlZ7/Ud1PksMT2qmVyYCveVjKXlaeRX435HE91MaEiTCSTFQiRoUNfOi?= =?us-ascii?Q?nGifv0XEw2kj189lBQggPtP8S0VU9A+CDbaNmwSe+t58Rz5o1xvQC3MtRZvM?= =?us-ascii?Q?+wSXdRPlprWTs9Wt4kEynfLunKY3rOl7lF/P4FeSPrJnF3JQkvYjlmTSbHXg?= =?us-ascii?Q?mSu0JUJ1VnboeMd4sQGZh69SitQWkPetTpTpEcYmTW3fYbKt4fNpf+hG18w?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0343AC1D30 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB541; 23:FilQTTQXvSTbRuhOePxNCneOOiNO4OpVCgAHyKbHBQ?= =?us-ascii?Q?dGoHTW9OM9JEALRz9Qj1ZKglltPSQGuhYwU3WXB0PRROOJsIHAr0LASCMlog?= =?us-ascii?Q?mOWfTvSbVug/snq+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V5qhciAaqI9JqcaWo/xGpD8wiUDvCa/eLiw4MWRBEZpZmrKOsrYq63JD+puWodu4di+aefFY= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 22:08:13.9132 (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: DM2PR04MB541 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 From: Bart Van Assche Since the srcu structure is rather large (184 bytes on an x86-64 system with kernel debugging disabled), only allocate it if needed. Reported-by: Ming Lei Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Cc: Hannes Reinecke Cc: Omar Sandoval Reviewed-by: Hannes Reinecke --- block/blk-mq.c | 30 ++++++++++++++++++++++-------- include/linux/blk-mq.h | 5 +++-- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 80b14457cf6c..2dff85cdacba 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -186,7 +186,7 @@ void blk_mq_quiesce_queue(struct request_queue *q) queue_for_each_hw_ctx(q, hctx, i) { if (hctx->flags & BLK_MQ_F_BLOCKING) - synchronize_srcu(&hctx->queue_rq_srcu); + synchronize_srcu(hctx->queue_rq_srcu); else rcu = true; } @@ -1106,9 +1106,9 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) } else { might_sleep(); - srcu_idx = srcu_read_lock(&hctx->queue_rq_srcu); + srcu_idx = srcu_read_lock(hctx->queue_rq_srcu); blk_mq_sched_dispatch_requests(hctx); - srcu_read_unlock(&hctx->queue_rq_srcu, srcu_idx); + srcu_read_unlock(hctx->queue_rq_srcu, srcu_idx); } } @@ -1517,9 +1517,9 @@ static void blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx, might_sleep(); - srcu_idx = srcu_read_lock(&hctx->queue_rq_srcu); + srcu_idx = srcu_read_lock(hctx->queue_rq_srcu); __blk_mq_try_issue_directly(hctx, rq, cookie, true); - srcu_read_unlock(&hctx->queue_rq_srcu, srcu_idx); + srcu_read_unlock(hctx->queue_rq_srcu, srcu_idx); } } @@ -1863,7 +1863,7 @@ static void blk_mq_exit_hctx(struct request_queue *q, set->ops->exit_hctx(hctx, hctx_idx); if (hctx->flags & BLK_MQ_F_BLOCKING) - cleanup_srcu_struct(&hctx->queue_rq_srcu); + cleanup_srcu_struct(hctx->queue_rq_srcu); blk_mq_remove_cpuhp(hctx); blk_free_flush_queue(hctx->fq); @@ -1936,7 +1936,7 @@ static int blk_mq_init_hctx(struct request_queue *q, goto free_fq; if (hctx->flags & BLK_MQ_F_BLOCKING) - init_srcu_struct(&hctx->queue_rq_srcu); + init_srcu_struct(hctx->queue_rq_srcu); blk_mq_debugfs_register_hctx(q, hctx); @@ -2211,6 +2211,20 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) } EXPORT_SYMBOL(blk_mq_init_queue); +static int blk_mq_hw_ctx_size(struct blk_mq_tag_set *tag_set) +{ + int hw_ctx_size = sizeof(struct blk_mq_hw_ctx); + + BUILD_BUG_ON(ALIGN(offsetof(struct blk_mq_hw_ctx, queue_rq_srcu), + __alignof__(struct blk_mq_hw_ctx)) != + sizeof(struct blk_mq_hw_ctx)); + + if (tag_set->flags & BLK_MQ_F_BLOCKING) + hw_ctx_size += sizeof(struct srcu_struct); + + return hw_ctx_size; +} + static void blk_mq_realloc_hw_ctxs(struct blk_mq_tag_set *set, struct request_queue *q) { @@ -2225,7 +2239,7 @@ static void blk_mq_realloc_hw_ctxs(struct blk_mq_tag_set *set, continue; node = blk_mq_hw_queue_to_node(q->mq_map, i); - hctxs[i] = kzalloc_node(sizeof(struct blk_mq_hw_ctx), + hctxs[i] = kzalloc_node(blk_mq_hw_ctx_size(set), GFP_KERNEL, node); if (!hctxs[i]) break; diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index ed1b43045ed6..384a448a92a8 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -39,8 +39,6 @@ struct blk_mq_hw_ctx { struct blk_mq_tags *tags; struct blk_mq_tags *sched_tags; - struct srcu_struct queue_rq_srcu; - unsigned long queued; unsigned long run; #define BLK_MQ_MAX_DISPATCH_ORDER 7 @@ -62,6 +60,9 @@ struct blk_mq_hw_ctx { struct dentry *debugfs_dir; struct dentry *sched_debugfs_dir; #endif + + /* Must be the last member - see also blk_mq_hw_ctx_size(). */ + struct srcu_struct queue_rq_srcu[0]; }; struct blk_mq_tag_set {