From patchwork Tue Jun 20 18:15:38 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: 9800071 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 1022260328 for ; Tue, 20 Jun 2017 18:16:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 130762624A for ; Tue, 20 Jun 2017 18:16:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06C4E281E1; Tue, 20 Jun 2017 18:16:22 +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 4543C2624A for ; Tue, 20 Jun 2017 18:16:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751042AbdFTSQU (ORCPT ); Tue, 20 Jun 2017 14:16:20 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:59226 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbdFTSQK (ORCPT ); Tue, 20 Jun 2017 14:16:10 -0400 X-IronPort-AV: E=Sophos;i="5.39,364,1493654400"; d="scan'208";a="124214906" Received: from mail-dm3nam03lp0017.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.17]) by ob1.hgst.iphmx.com with ESMTP; 21 Jun 2017 02:18:20 +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=yPKatKXBZw+kqrUnOSlx8tVGX0xsN8NaqWhT0I5JIlE=; b=VVKwTb73v2tCY2JKtC9KQC98c5A1I1cz0wszpZSYfqbUPtGZWoYHZwFjIgdt73DftFGEXi+aGWKjnI6KZm4AiO5jGBjQorc7a7c2hNSXPD8nK/mE2dqS/RYjMDtyO3KqMF1M7aekkcm1DYdGJ4R9ftKIJj2LTLkJr9XLkb8CtQo= Received: from DM5PR04CA0045.namprd04.prod.outlook.com (10.171.152.159) by BLUPR04MB531.namprd04.prod.outlook.com (10.141.29.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Tue, 20 Jun 2017 18:15:57 +0000 Received: from CO1NAM04FT015.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::200) by DM5PR04CA0045.outlook.office365.com (2603:10b6:3:12b::31) 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; Tue, 20 Jun 2017 18:15:57 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.21) smtp.mailfrom=wdc.com; suse.com; dkim=none (message not signed) header.d=none;suse.com; 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 CO1NAM04FT015.mail.protection.outlook.com (10.152.90.169) 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; Tue, 20 Jun 2017 18:15:56 +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 69.16.02805.B5669495; Tue, 20 Jun 2017 11:15:55 -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; Tue, 20 Jun 2017 11:15:13 -0700 X-AuditID: 0ac94369-9c18398000000af5-de-5949665b3b04 Received: from exp-402881.sandisk.com.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id C0.5D.11415.85669495; Tue, 20 Jun 2017 11:15:52 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Bart Van Assche , Hannes Reinecke , Omar Sandoval Subject: [PATCH v5 01/12] blk-mq: Reduce blk_mq_hw_ctx size Date: Tue, 20 Jun 2017 11:15:38 -0700 Message-ID: <20170620181549.24903-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170620181549.24903-1-bart.vanassche@wdc.com> References: <20170620181549.24903-1-bart.vanassche@wdc.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsXCddJ5kW50mmekwacVShar7/azWSx4s5fN YuXqo0wWe29pWxy+d5XFgdVjYvM7do/LZ0s9dt9sYPNYv+Uqi8fnTXIBrFFcNimpOZllqUX6 dglcGdtW97AXHJWvuHxkNWMD4yKpLkZODgkBE4kHy1cydjFycQgJLGWS6JtyhRXC2cEo8fZV NztM1a3Tj9khEssZJU5Pfs8EkmAT0JM4NW8fmC0ioCDR83slG0gRs8AjRokvj/oYQRLCAtYS nz4tAStiEVCVaPn4HGwqL1B879WTUBvkJaa962UFsTkFbCTeLznNAmILAdV8/X4fbKiEwDxW ifa1c1ggmgUlTs58AmYzC0hIHHzxghmiQVni/NonbBMYhWYhKZuFpGwBI9MqRrHczJzi3PTU AkNTveLEvJTM4my95PzcTYyQcM/cwXj3ifchRgEORiUe3ghlz0gh1sSy4srcQ4wSHMxKIrxy cUAh3pTEyqrUovz4otKc1OJDjNIcLErivOdkpkYICaQnlqRmp6YWpBbBZJk4OKUaGDl1mpf1 TlQWbl763l98hlPkYr9YPt3/5i/7IuxLXPfLfPv7xabAe2ng7qi1U/+W8IvP5bzrr58cZXM1 1vFu0BNWgzwp/atznmwQ8Q4rqZdYKsO+ftmXx79/pnwu93y/yS14buBhW6W3J9apXBOecvhH msDj6/+dtlwNUW6osNyUsMWyfmqMgBJLcUaioRZzUXEiAJtzUOFzAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJJMWRmVeSWpSXmKPExsXCtZGTTTcizTPSYOFMJYvVd/vZLA7+bGO0 uPTnC6PFgjd72SxWrj7KZLH3lrbF4XtXWRzYPSY2v2P3uHy21GP3zQY2j2lrzjN5rN9ylcXj 8yY5j/YD3UwB7FFcNimpOZllqUX6dglcGdtW97AXHJWvuHxkNWMD4yKpLkZODgkBE4lbpx+z dzFycQgJLGWUmLDmICNIgk1AT+LUvH1MILaIgIJEz++VbCBFzAKPGCW65vewgySEBawlPn1a AlbEIqAq0fLxOVicFyh+pG0GK8QGeYlp73rBbE4BG4n3S06zgNhCQDVfv99nm8DIvYCRYRWj WG5mTnFuemaBoaFecWJeSmZxtl5yfu4mRkjgRO5gfDrR/BAjEwenVAPj/tc7kg5lrr/4LVg9 QMegPfKgQMCxm7PVRHfet2vb/Yhv4sfXqs18F9yUmSU7tH9aHvgjciNaYVfSoX+av6dbu/jG 5F9VvaLxxs3vxz6nxUzbOl/tDF+TnsoZ3+QZHGP34mWOoG97YnLZhxd7+S9aC7Q7Tc+Y9bY8 4M0X1S4/drlbW+OXLlJTYinOSDTUYi4qTgQA69hcKswBAAA= 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)(39850400002)(39410400002)(39840400002)(39400400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(8936002)(2906002)(305945005)(33646002)(8676002)(81166006)(110136004)(38730400002)(106466001)(356003)(50226002)(105606002)(72206003)(76176999)(50986999)(478600001)(36756003)(54906002)(575784001)(86362001)(5660300001)(47776003)(6666003)(6916009)(2950100002)(4326008)(77096006)(50466002)(85426001)(189998001)(1076002)(5003940100001)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB531; H:milsmgep15.sandisk.com; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT015; 1:AoLQQa3clMCxFSUpw00Mjtj4nJ3Puu3mHfvFIFA0OuwcfiODPDI8XDPCKf22ICnMb0d9Xi++f76oS6tWznsfquTTL4QeJ/vaEJYGIE0MEJxzcza9quUd+B5mUzAfEzBhYtTNmkQEDo6DIiIGSEM76f6DwzfXp3/PJWYdmrupCMcn3okb23icxG2OnhuAvJZ00V2rFSp1HxY4IGarlz/fSFnNxdhKbBQhOofVuTSOedSg8nYUv+8pZZHxDoAq6qjro7TPJr8qCnzQ88ofRmBR54sgZDoPDHZjVRfz16uaIa7CWdOQHyxV9cKsN3bYnzDBW+IujUo2MjTs9j0HR1H/hQM1Gn/n43WP2F08tqhNrVfNfcagEZiHJNhZN/G6T3VqNi3oH/QVQjpDQiyq0ejUmpDe98u8LSb5Ug0eGENT4hY2eYnZeXc/Pff+hXCXYxHF3JjwfURvW3qSKX19w9yqn01IvKJbwFs8UuyN1xbwK97GOBwwS0GQOox/dflou3sfnTn0zU6Mu6JBXPJ0M3pX7tmFs315tbpJX933xRxRQAdXuFdR/P65OAQYVYLoiFoWZrOi+HBFowaW6ePxbwLBIsgcYduGjL24dNccTNySMB61LUjx3/so5LkzyHP1q2Qvohd5umhCFl21OOz0bXOF73bsjWA76npNo5porUs5/A17p7obiJdYR2J+8zs6pSLVMfIEIqEA2Qn/YFeaKJmsn5UTN/g2z5kz8tHNXyweEhQ= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bf01c393-98d2-451c-f737-08d4b80865bc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB531; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB531; 3:QLvlg3eBgs/eZyoM5VndexEo/Kdlb1AmHp1+jF258pDD94US0e+L6Y3B3/Lid1WDly0rRUSc3ag8lQIHNovCqKkYt1IzIJzKIanFzQizqK/vBhK9ZWuIFCSJyFF5IWz4yL65OojbkLxaHDbcX9DpSPHeGHmGB5zvPNnIGRxMoTQmyajFxLhpg+YE7YzHYuIy5BuDXPkvGoAFofWCbvHgALkNu2h9P7mgJFmwZKiBIugTnILe10EJ+ao1DuxXDtfmEhGEzkmybRkUninVlnfGdawJ1QfbQWZGpVyk1KW12QmufTYgIrCHNi+9WIwoXh9YAyIciT3jowblMqshM5kOk0V/qmVTRQVIXulSlXNsli8lhpK2QD5lh5BjmTSx3wMP8KNy5Rf8z+28VYm87N8BpC3mcW6JI9KiB2NFzgx7Vnaq5swokJJ4u3bGdXe7zF6KQKVlel1rWWf1jBmdrlSmQQ== X-MS-TrafficTypeDiagnostic: BLUPR04MB531: X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB531; 25:Uw7zMi6DWSdRyyYrgM3v4gInwHd7AEi9usCmSsvuPtd3Q0yCfS595ZncKbfGUg5fvJgRKwD19OSvNuPORpU5nrzbF0DILYEJrF8mazAvFUhkdxE8kPEeChvwvZqxKIdM6wE6k8xmFwduDfsiTtNEScnCnZSiN5e0q4hEIJSfszMfw5rDJuXqSl4WRbP5i44MwXp2tO1zYaXnEIegMVma6AdOYatzrzaqxUpKhj49tNBMxoatRTx+3wbCjj7PuJF/9inlRgB3OJnABihL4ARQrUx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ft-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)(13018025)(8121501046)(5005006)(13016025)(93006095)(93003095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR04MB531; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR04MB531; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR04MB531; 4:Te8gsHg45KAtl5LAQxlCeRSJi2T06L/mS1kNGhgXwbr?= =?us-ascii?Q?e0XjhvbEQrJmEePJN1wpInCIps76M/ibHF37R62c23o3yn0QU8D/D3WjEv0K?= =?us-ascii?Q?9+NPceOtMiZdWOheghbE/VP6T7dsIWqPl+VX/ZWV2zcVlkJrKLwer7P+DsIl?= =?us-ascii?Q?kaGIQpzwsWQQ/nx5q2uidryfEJPRUqXC+o/8rpahC4qCGJiFQqWSBwl1ORAB?= =?us-ascii?Q?iSdaBAnQkmYbX3ef7bLNfvv/P/6hHvYs5X0WxElj0dtRCeBVVVFugSPjpitn?= =?us-ascii?Q?snFBhk+3DAp+8Q5WuJquoHybrLF4IGdmJpZb/U09S75HljRuHcW1vRVSerhf?= =?us-ascii?Q?+muFDn87KbxES6X9DW1aYCb6oA7Jr5iDExSVMosi1jJym2mNwG8Dvo+DAtvF?= =?us-ascii?Q?krcy99UDyOEU1zXQid6SodBD4Z/hI6NzPE44nEyEJQbE55nWiHkh7nWTNY3X?= =?us-ascii?Q?KBe6BXTZ8hKB3mD50I0szOgOCnXPLHemJMIh7JE1gKcnqx4SBeoLUHoySH8s?= =?us-ascii?Q?Ft4usYoCZZjKFVKixEUmWu3t1wHRNRpx6nL2zYbXsWBIsLXwlfgqYKkGFE6f?= =?us-ascii?Q?3JoMI4fzHJMvoVPNy2msPztynE0HV66W3+XYcHtTGR8S+amkcjEda1VSjYLO?= =?us-ascii?Q?lTrCqPhiDNLjgw9xfHc/l9ww1R5g4vhfgEgYbKquuQOjp8c44K00J7v08zRb?= =?us-ascii?Q?2xVgEYMHKrgJf8htS3yIATEgKF+TuNNnWCYh43VmSBTTt7MniqHwg2pAHtQ1?= =?us-ascii?Q?OKePsH4x9xXLFiaN6dllYEQLjavQrm/GUVQudkeeWGf+TTw8Z0JqOm0ANW/x?= =?us-ascii?Q?NHum/tye59VSWX0lsw/s17rZzprBvY1YLh7wKMbLrEDUcxEkerq67u88oh3u?= =?us-ascii?Q?sXoQtxuauqQqydVt9xfpP8dK+vHkBMAHO+O6dm22JsiONplrwiUihM/i4ElN?= =?us-ascii?Q?CGxszvyBtwWHdvpXbaNy/nwxxtQnqzbuJQuH5BdLIplmWCqikAeuSLzJN86v?= =?us-ascii?Q?4sWCX85xVS1yOdS+y6VYI5gmm8eJaOizJfD006jWFHClFmO43TDz+DxynjOi?= =?us-ascii?Q?CWlqfkT8ueTgRlOHw90UyoRvCQcePdOiE4PgqicJ0l+eZIXIp5dJU/XTlLrf?= =?us-ascii?Q?Xic9oeNCTp6yyMc2cOSXwvhMUVGuE88Oi7C16iKMiBhnE1CTv3QdJTRnhVlM?= =?us-ascii?Q?X5G44TueAUk+XHavrka2elIIeiHZb3SMCU2bMGTxpT+/IQ6nS3nflI13gkbN?= =?us-ascii?Q?jzDl9jQKtlvbGdKzN02FvuLoL3KtzriNyvd31FVbtWoua3c5drJSbfzoo6A?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 03449D5DD1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR04MB531; 23:RAuSWXhBWB2yyAuBp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wp23okpF2tz0q687g0l7VK0FAe8dUJ34eKLlZIpohbqJyg1G00E9hA?= =?us-ascii?Q?Lt1DsT5KDk1IQAMNNywqt8NdJUSYqj7hhy07JR2EwEPH/r+vAAj7TBBwPVkB?= =?us-ascii?Q?fkfPbMliJW0ev1uDML3N7WdTzFgicttY30lSN3z0zTOsq0mRpUt3jEfs9Mmz?= =?us-ascii?Q?lxLx8G2P8jnljo3OXRAsOoF2RNDzI+Hnpj5wJpfqs5kIqUp3En/23foU2FAL?= =?us-ascii?Q?vt8L6j3U1oS+Yx30tMqC+MhQgaFBGQUXDmppNOgLoybYeaY8Yp1x6uK0EYkP?= =?us-ascii?Q?hz3WlqsPsQ2nw=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR04MB531; 6:97pJi+TsnNs399v7u4wz6vEZFwZHqox76wq0QGx3PtU?= =?us-ascii?Q?i/lUKHOzmWtX5XiTL1DO74zE3JNWNegJ/7LVccdnCb1FiYdapGdLTclAB9Od?= =?us-ascii?Q?fWVENnsrhPD4+b0gqQOBfVeFD8Yd1q3WR6BgZEoGxW7YT1ze8xawCUDn9y+x?= =?us-ascii?Q?A2/n1skQYVMCVjCNkH1WUjL3D5rYJOUqCZzAuUQAz5VV+tisYYN0UpLUQrhC?= =?us-ascii?Q?glCCkLPiYn67jkodlit1Yc/GOIxkGyENjqutFcH89BvEeJfwzyMH2T1QMYoN?= =?us-ascii?Q?d6s0YaOesTY0I3lfsqUDF8K9M8wbejynmth9YVNbLWj2VO/JXWHFkunmENQU?= =?us-ascii?Q?XJANM8pQd1uNjw+S21l5jZ8SRLWz4b0l6Zw4RVzry50FpdVU6s1ZMHrdwj19?= =?us-ascii?Q?IAd6Cz9FYqnJcS0ydhIpG44xGnV9K9r7dgF+PN+2qBpsOEySvRu0x08eg7Mq?= =?us-ascii?Q?4qeRckT63QrX7wj8rr2hXP/7tPANN/8SSiirNNfZWCOmhH/XGcZhPHORnoVS?= =?us-ascii?Q?Egjyk3k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diagnostics: 1; BLUPR04MB531; 20:JqJ+biSfPLfMOdm+yPRGj973Q0REd76HikAN8EbfPQDzl3xQRLfkz33ABkITrfNigabsYkCCy2iKcYrXXF6E4IypHIr5aj31XRraHXBDyLSULamzK2UbX+6fJrPF+BH04juHKCwFklI8iHk/OVC8N3uqeGpYJGmpy4mZk9yXt84= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 18:15:56.5808 (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: BLUPR04MB531 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 --- 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 ca03cd4b263f..3e0cc11b1a90 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -172,7 +172,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; } @@ -1094,9 +1094,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); } } @@ -1505,9 +1505,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); } } @@ -1853,7 +1853,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); @@ -1926,7 +1926,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); @@ -2201,6 +2201,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) { @@ -2215,7 +2229,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 f1bd13ae8f57..3f2c22a42df6 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 {