From patchwork Mon Jun 19 22:07:59 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: 9797959 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 56B01603F6 for ; Mon, 19 Jun 2017 22:09:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FF0326B41 for ; Mon, 19 Jun 2017 22:09:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34BC026C9B; Mon, 19 Jun 2017 22:09:14 +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 7F48426E49 for ; Mon, 19 Jun 2017 22:09:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750903AbdFSWJK (ORCPT ); Mon, 19 Jun 2017 18:09:10 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:21855 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752582AbdFSWJE (ORCPT ); Mon, 19 Jun 2017 18:09:04 -0400 X-IronPort-AV: E=Sophos;i="5.39,363,1493654400"; d="scan'208";a="27623325" Received: from mail-bn3nam01lp0180.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([216.32.180.180]) by ob1.hgst.iphmx.com with ESMTP; 20 Jun 2017 06:08: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=kxEq67HF1taZkoc3ZzhEYrmAbqzQB35OcN0T33wxYjU=; b=GltA/D+ns5blK9QZ+Lkg5ewGBQGFyVvGGkJvqEeGoqGAwktsX1j5PHuW8Y+nMBbVSaAtJPYPlecbHAPqVi8Eiw9U1h36MmzJhFx/n8ksRDt0U+7op6iycfrf2YHagqu0viLyWI/sNBlpnwUssrlpWxYC9lhY3NyfkVxus+y29XA= Received: from BN3PR04CA0018.namprd04.prod.outlook.com (2a01:111:e400:7a4f::28) by DM2PR04MB543.namprd04.prod.outlook.com (2a01:111:e400:2430::17) 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:18 +0000 Received: from CO1NAM04FT055.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::208) by BN3PR04CA0018.outlook.office365.com (2a01:111:e400:7a4f::28) 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:17 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.21) smtp.mailfrom=wdc.com; fb.com; dkim=none (message not signed) header.d=none;fb.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 CO1NAM04FT055.mail.protection.outlook.com (10.152.91.17) 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:16 +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 37.03.02805.E4B48495; Mon, 19 Jun 2017 15:08:14 -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:10 -0700 X-AuditID: 0ac94369-9c18398000000af5-3f-59484b4e7ecd Received: from exp-402881.sandisk.com.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id A9.4D.11415.94B48495; Mon, 19 Jun 2017 15:08:09 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Bart Van Assche , Hannes Reinecke , Omar Sandoval , Ming Lei Subject: [PATCH v4 10/12] blk-mq: Document locking assumptions Date: Mon, 19 Jun 2017 15:07:59 -0700 Message-ID: <20170619220801.12557-11-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+NgFnrBLMWRmVeSWpSXmKPExsXCddJ5ka6ft0ekwaFNVhar7/azWSx4s5fN YuXqo0wWe29pWxya3MxkcfjeVRYHNo+Jze/YPS6fLfXYfbOBzeP9vqtsHuu3XGXx+LxJLoAt issmJTUnsyy1SN8ugSvjzOn4gnU8Fc+aOBsYV3J1MXJySAiYSJz+sIWli5GLQ0hgKZPEmnMT GCGcHYwSW7avZoSp6p64kxkisZJRYsqaeSwgCTYBPYlT8/YxgdgiAgoSPb9XsoEUMQs0MUm0 TPgB1i0sYCex8NgsVhCbRUBV4tT3vWDNvAI2EkufvGeG2CAvMe1dL1gNJ1D8++SdYL1CAtYS n99DnCQhsIlV4t7yBVDNghInZz4Bs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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)(39850400002)(39400400002)(39450400003)(39840400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(50466002)(47776003)(478600001)(36756003)(106466001)(6666003)(33646002)(72206003)(2950100002)(6916009)(1076002)(356003)(50986999)(4326008)(105606002)(8676002)(5003940100001)(76176999)(81166006)(110136004)(575784001)(50226002)(305945005)(189998001)(38730400002)(53936002)(85426001)(77096006)(86362001)(54906002)(2906002)(5660300001)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR04MB543; H:milsmgep15.sandisk.com; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT055; 1:b/Qz5yJOGnovTB0YlSsYKKN8zovvQ3BxaYabWNuNe+J/JskLctU0c47wpwz0uFeyfJMLizEytuoWOdZcxf/r+PpTqpmgWKsrnf+JZzoBdEJ9g26gLc7kZLRkS815BN0F+8wyorEIazNb3UyNoicjc2vLokJNeM53z9y25DwC7rSOe8vAnnRuiNLW61HlnLEgKnB70wYpzHwQyOs9aBiNJ68EY4masmb0Fdvf3GgWBnrxlTBhrSMnnPYYSsQJu2MLBCXikokKH9rkFzD/pnTK6JfWlwdz4db0PywlHnl0DK68ZXchBTRP8w7QmvydMuTE22FGZ2mIZF0BVDWKgQ+DCJDRdVGVKntH3x3CGVSBi/7OekLSArbJj7MkjeeIz8kKVrQQE5sKUOymK3kcq3dlzv1CDehLojtCGUyFsZPfUkbgDWuOUzEnRTA9UKeyf9DX/nzOztXxhur1HRWNoNIss+QM66KfDDVBt6905gwE37sioB6w7u041wDo6ufukkVJfWt0VR1qiRZeZrdomPYM1wsZUNQAYFDwCvFzUySfyOw95W4vQ7XqEaiiRVZTgnRk4N7XWK8bhGmKnLdB+3nQYLFSFySdvC4Vg5/2teKJ0atJWWxPiWqZM2swDeM7+/wR1mNzgAWyazBA+o7z5FlAV9ltRG384bCno2yOkA3h6xUBHb4ZcaM9rp+kMI39nR88sjFFySHd6TQ+6oEEYBdWsejUutffbtzyR+rzbhc+X9ww9wDQ21LpKyV6JAgWyXQMXpUdWhPMhipG1rqfuTsD4gFPC2GfEw6qhhwzzNl73r9oBWvkNE1InlYaVgmwbaTiJuXXCc8cjuuvCqffi9rOcazuujo2Y/tKVb+YiGOjLDh0o11DPUghf0rKuPpaVZlt0Ty0Wg3uDJepU63lhVf7roBha0oSiZBiTEjOtlYZhU E= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR04MB543: X-MS-Office365-Filtering-Correlation-Id: ec23e88f-9040-423f-b0e2-08d4b75fb01e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:DM2PR04MB543; X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB543; 3:nsd8EL6kEuVjG53qNHwSa+rKsX5U7FQNuxwd2fvY6q1aacC7uQzLtAo53wFgSCs2n96oHaBHJdrAkRNpw/WcMZ5DhBUEdp7DJdN4MtaPXZNwiWFBB56txx4uLNucED56DYIq8BF9Glo1exklhOT6tz86n80+GwXxpnhCLt6azJiOpOlix/hAO2hmhBq2d4zdIjQ+SasFMZJ5Junz+ryT6Eu34TYD2hoL5q17H7dRWTfgW+EMmaVWg2+Lyslo5rZWZGdsRORleDj1IofCIAAmjYk9j1Umt/K+yoC4xiKF39k084yT2FFwzXVilRKRUqjK81pdqavyUDw0Am0BXEAtVBcSORAJfClYy2qN7aYqyJxPFdOL7Cl1aF+2lQViYb7Ry3xGGNje//vVvogbFsUky5oMGHjKRIA+PD++upbWYiTt+KJymOXJhtDRG7yNnij0TD88v7Z48vBPGPIJhwxUZg== X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB543; 25:kSecYTR3+iLFK8pQe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1EyEftqyWfM/cqtI1b51tyq1OkRnpS4b9CX7lnQKRiuL9yZpOjFZ5D6s6QBTQMAUuKiVku2Nn8ZyxxPbdeYVK0uv+ixxxrfW7hDn0iXodN9trPqjd5hytdc/sjB73A93kXjljaWFBvNuYpYTMjC2I6JJccthG8YrXuKfBEzPqRJmFf6m3nqSH14cjYFyoMmw8e/dGEGOKOkafNNscdjcIGutruIDWKM+ipcq9Q/dvoFfSi6SvkYz3PlMDaYTiyYN8b4o04uOZbiQ+KUFlc 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)(5005006)(8121501046)(13018025)(13016025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93003095)(6055026)(6041248)(20161123562025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR04MB543; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR04MB543; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB543; 4:AeSqLuMZPs1JeBd0Qn6DMbzyLKnCL6VG2g1ipIkI222?= =?us-ascii?Q?2S4sNq831tXnT1hTML5vMr0ksu0DQOvPoQfAxPL/LTNcr/0J1foyrHtDrVlS?= =?us-ascii?Q?E/2t+bEou99vy1YnCXMsl/Zrk5s+Ue23r7xgla+O5/DdKhqHVvjCtvXiKS8o?= =?us-ascii?Q?luFu/OWovh5de9XXOwcSckAq3m989HLvE1I1k/3q9sAmI2X8TNQVToO81E7U?= =?us-ascii?Q?+LTK4tZ6m8Qsdow9IZiIzXyCR8xs8QZbeNE/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YopLKnxZBYb5KL+0eT+sCf7ZTndjcdj7nk8hNxWsK/hcKRY6A?= =?us-ascii?Q?QRe8aXPA/ddXktg9TVtDmxLK1h63iIjtiyQvroa9JUfnxM7Q8IYLlq1beCXT?= =?us-ascii?Q?yESvOjhZvoLR7dNvmGU/V3bep5H8GPS0Nv6+EtWbSDvuh64pPPPTP1qvbPA?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0343AC1D30 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB543; 23:6aTJBwfE8L9dihXeKzjIOCw433t3Pk+Ro6u33ST2yR?= =?us-ascii?Q?sGupfM/tOI7d6THK7WwFu9TnidTlTQerBKAvQNe3UBhwVjsbqmoVihQJ7sQW?= =?us-ascii?Q?5Wd5lkDrRXIpidYMOAAuJGIUqnyUisIMClLODt2tFkB6YLtmGRGrM2hwo/8R?= =?us-ascii?Q?wtC6o9nFgHFY5D5hV9ADMextN3eJgdxcOSB9fC5IvnFmJi7HZdC1mm4Rnbc8?= =?us-ascii?Q?EpOg4Z6MET3cEbmJsN8rA7nOZsQPNhmV0wI83yorEVOZv6HIroRP8Es9E42v?= =?us-ascii?Q?nrVM02WX++ceIUIAKSIYfSwrQ/6uGfUVHRQIl0EqbTSccnyeDib1OP5khZ93?= =?us-ascii?Q?7wYqB0dh/JMeb5nf7xhbetTSMnmwE2Q7gpVahfLKmI8bpP9qEIffthLYFTkF?= =?us-ascii?Q?R684AgN+45LrcArey1LIzYQ+U6wC+dxMBjUhSKQXrwh5LPvarqO0nKxDg/8L?= =?us-ascii?Q?b5Xvww0KKHkidCdrGJa8vXHTvL4u5zb8hy77BwqccS2OugizzPdvM/gW91ae?= =?us-ascii?Q?VQ8uuXsSOZgcSyLPtOciWwUIh764a/KaB21/L0OXSSvp8LwEsRwlxKHr1fKF?= =?us-ascii?Q?kbAws2jb10X4FaKXQSrmdYeUZNo5pn6dGVmSjXjYbQWV0aSnBwQ+8jY5AEdj?= =?us-ascii?Q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cqEOC8gpoLLDW6hvKqVI/EwmvFEi8QF1MDa0gnmM9eJJhsWkiWaMiXxb6ANSMAE16QxrO+KH//iibqp7xhMMIv65rVqFmB+4xPRqE0tjuzDNfVJD0TrLQUVdA+HNiGvb9JgZq0lSyuGzfHXtyzJr6wJfelGhT1TdVYNlq15+GylZj8RrUslOGbslG+J81X8+LP4pFKTx+2jvcXTWN+Z50qzCBPErdYby1nZAgc3yaJAl0CcdiaR3Rr6O3V2a9frap5Ob6P14OuSw2rc6k/DoRgvfDkmCsURxbDf0195YWbAxJUSn9h5DBCaEF68MJyKHyt1/UkhwnGQZw= X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB543; 20:+CnGwps4Fh4uoICoy2INh3Cgrd6DhJxQEUg16zuF2HlM9OEoozxGPEJz1fQmz5320pNxjcfWniJVon0YgBTv2L+YbYV1xeEHLw+T28C1XiVcmMPUS3MsK2qSiTJ5e8rmYytdCBEj/nj+mlNIF/d1E0GSgC4FYQZMs3n9njiBMi4= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 22:08:16.6909 (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: DM2PR04MB543 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 Document the locking assumptions in functions that modify blk_mq_ctx.rq_list to make it easier for humans to verify this code. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Reviewed-by: Hannes Reinecke --- block/blk-mq-sched.c | 2 ++ block/blk-mq.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 9f025289da63..191bf82d185e 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -150,6 +150,8 @@ static bool blk_mq_attempt_merge(struct request_queue *q, struct request *rq; int checked = 8; + lockdep_assert_held(&ctx->lock); + list_for_each_entry_reverse(rq, &ctx->rq_list, queuelist) { bool merged = false; diff --git a/block/blk-mq.c b/block/blk-mq.c index 679b52790bc1..e7b0d69fdf65 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1328,6 +1328,8 @@ static inline void __blk_mq_insert_req_list(struct blk_mq_hw_ctx *hctx, { struct blk_mq_ctx *ctx = rq->mq_ctx; + lockdep_assert_held(&ctx->lock); + trace_block_rq_insert(hctx->queue, rq); if (at_head) @@ -1341,6 +1343,8 @@ void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, { struct blk_mq_ctx *ctx = rq->mq_ctx; + lockdep_assert_held(&ctx->lock); + __blk_mq_insert_req_list(hctx, rq, at_head); blk_mq_hctx_mark_pending(hctx, ctx); }