From patchwork Wed May 31 22:52:43 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: 9758471 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 1EC31603F7 for ; Wed, 31 May 2017 22:53:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE292766D for ; Wed, 31 May 2017 22:53:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04CE9284D2; Wed, 31 May 2017 22:53:05 +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 8E3AD28453 for ; Wed, 31 May 2017 22:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751153AbdEaWxD (ORCPT ); Wed, 31 May 2017 18:53:03 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:34668 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088AbdEaWxA (ORCPT ); Wed, 31 May 2017 18:53:00 -0400 X-IronPort-AV: E=Sophos;i="5.39,276,1493654400"; d="scan'208";a="21792135" Received: from mail-bn3nam01lp0181.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([216.32.180.181]) by ob1.hgst.iphmx.com with ESMTP; 01 Jun 2017 06:52:59 +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=BvMlowFFKBPkwMZ9dOddE/i0OZ3IENil+ygQsdDAiQI=; b=IGfdWHHXgiYTYSeeyrPW7NTkULSwVx7zOezvnVnjNOwdrxfxB8ZfT9mJTOJnluCc7RRjdB18Vh5NTU9Qgs7iV0n0L1qFTWwvzUQXp58Hmxx9B5UEmvYeVA0xe5ON+A90Ip1ztD3q6pESpFINbRWWKbIGiBR6TqOyYRuiUlPpVkI= Received: from CY1PR04CA0021.namprd04.prod.outlook.com (10.166.187.31) by BN6PR04MB0389.namprd04.prod.outlook.com (10.173.198.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 22:52:55 +0000 Received: from CO1NAM04FT011.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::201) by CY1PR04CA0021.outlook.office365.com (2a01:111:e400:c5a5::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10 via Frontend Transport; Wed, 31 May 2017 22:52:55 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; 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 CO1NAM04FT011.mail.protection.outlook.com (10.152.90.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1101.12 via Frontend Transport; Wed, 31 May 2017 22:52:54 +0000 Received: from MILHUBIP04.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 B0.05.51736.5494F295; Wed, 31 May 2017 15:52:53 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 31 May 2017 15:52:49 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-a3-592f494537e1 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 5F.1F.18148.1494F295; Wed, 31 May 2017 15:52:49 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Hannes Reinecke , "Omar Sandoval" , Ming Lei Subject: [PATCH v2 09/12] blk-mq: Document locking assumptions Date: Wed, 31 May 2017 15:52:43 -0700 Message-ID: <20170531225246.26261-10-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170531225246.26261-1-bart.vanassche@sandisk.com> References: <20170531225246.26261-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJLMWRmVeSWpSXmKPExsXCddJ5ka6rp36kwco5phar7/azWSx4s5fN YuXqo0wWe29pWxya3MxkcfjeVRYHNo+Jze/YPS6fLfXYfbOBzeP9vqtsHuu3XGXx+LxJLoAt issmJTUnsyy1SN8ugStj9dfFTAXvuSsOH9rI1MD4ibOLkZNDQsBE4tmiiYwgtpDAUiaJle0c XYxcQPY2RomG9lPsMEXXHq9jh0hsZpR41/geLMEmYCTx7f1MFhBbREBBouf3SjaQImaBK4wS ay9/ZwNJCAvYSdz6c5YJxGYRUJW4dGsKM4jNK+Ag8XPvJDaIDfISZ7fsBItzAsVXbz/BDnGS vcSmI4/BhkoILGOVePl2J1SzoMTJmU/ANjMLSEgcfPGCGaJBXeLkkvlMExiFZiEpm4WkbAEj 0ypGsdzMnOLc9NQCQ1O94sS8lMzibL3k/NxNjJAIyNzBePeJ9yFGAQ5GJR5egYt6kUKsiWXF lbmHGCU4mJVEeH3V9COFeFMSK6tSi/Lji0pzUosPMUpzsCiJ856TmRohJJCeWJKanZpakFoE k2Xi4JRqYGytS7Z+LimsuMzfTPtK8GrDXM2ANtN1pgv01u3Wrq+e7v3q4pPzeXY1jkdfCvVp qt3ctCP0zZnX3x4VHF+15J759O13VgnNXsq4hYFT+92kyD0mwRILXzfmrMxQjksU0n9pHtvx WPLx1F45ltfr509Msbx4ap7jklmRTXsSMqeeuGxfaZbWsk2JpTgj0VCLuag4EQDb/HADfAIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJJMWRmVeSWpSXmKPExsXCtZEjRdfRUz/S4MIZaYvVd/vZLA7+bGO0 WPBmL5vFytVHmSz23tK2ODS5mcni8L2rLA7sHhOb37F7XD5b6rH7ZgObx/t9V9k8pq05z+Sx fstVFo/Pm+QC2KO4bFJSczLLUov07RK4MlZ/XcxU8J674vChjUwNjJ84uxg5OSQETCSuPV7H 3sXIxSEksJFR4sDRdhaQBJuAkcS39zPBbBEBBYme3yvZQIqYBW4wStyZMpUNJCEsYCdx689Z JhCbRUBV4tKtKcwgNq+Ag8SfZ5NZITbIS5zdshMszgkUX739BDuILSRgL7HpyGO2CYzcCxgZ VjGK5WbmFOemZxYYGukVJ+alZBZn6yXn525iBAcOZ9QOxusTzQ8xMnFwSjUwrrTbfeDbjcec cYFX30WFZNcvWLPppNRNVe5SLya/G6+mrLT0a/8kWfm07KV278PZS2dNKLlwTH3CjOnXNk12 7U68vcBRRvHf5PfvvcRZ00retJ85EVund9pLXvrxo8cfpCfNvGVfGrR0lsjMf23PL4iZKjLe 2GB15cvDZdfSd2rP29AdcGXO02olluKMREMt5qLiRACptawXzAEAAA== 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)(39410400002)(39400400002)(39850400002)(39840400002)(2980300002)(438002)(9170700003)(50226002)(8676002)(8936002)(81166006)(5003940100001)(50986999)(54906002)(356003)(77096006)(33646002)(189998001)(76176999)(50466002)(5660300001)(47776003)(48376002)(478600001)(6666003)(6916009)(106466001)(72206003)(305945005)(1076002)(2950100002)(4326008)(2906002)(86362001)(38730400002)(36756003)(110136004)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0389; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT011; 1:J0l79Pte4Jn8ofwWUDEjKXbvlJ1NuBHjn3c+tkCt96CTRGd4KgUfZBD3PlvpquShO0U3x0yxKoh7OsByMUFGXq/b8JTNq4L6FOjh0iUoL7S+mvF/mSqealj3znIYM9NHw4XItFKBnc7EWvatEFik9vPbc1EBUbBvUq5IKAFddGFZhe6rNcPsYBz3OoWNu5Ia/CH1puu8k30KEs/6cdZNhSWmLkIcy9hddX2bh/7Iw1imIPbP69E9b8cyg1IxGOWNqhfb2zChrKszCJCgrD+X6Ky1pQec8/erj2RLouo9JH88/b/5dUJqt6S5RIh4tnfwdwaUf7UhwO0cpfpNei3Cz7hlafHmKdCDTJbjYiE66tee2zWxgP+1bGCu2IxVmVX0Mcu8SUHldqlKuBPTNc/lxiEYSdBUXaDUK/MrlIvz5WSuHvOGKMEGWxM6HQvEHu9VqVvZ2MfRH0eKHNlu5fcR56owWXKJEz3k+f0FnNldlYewtDM0FQd8myA2Ws/o8d2kbnWdPc72bzAWEBQxPRkK4wgC8iPI4EvGWvLsQDpnZBpbVMrVPCXWxbsOr0a5vrre X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR04MB0389: X-MS-Office365-Filtering-Correlation-Id: fc19aadd-610b-4df6-202b-08d4a877c6aa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR04MB0389; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0389; 3:Gwkfq2G8OfDORAgm6dXcLzSBc9VpVP++G82cFZSDbbskrOTh9GIqs4TRBp9zf0x4CkAQ1zZ4d8lPE3soYKY3G+6+pfYdKdcDAObxygPrNDPF3nActZx6zM3b2c4CPScHGo4Qu7YAUsSLIJhJM+Zr1XJu96DdqhAiIJ0PLwsW0W8iYIUPm/5dt0yg1ZUb+D8adYLy2oI2+HWBntCRmiP1vh3xcaIdAwKIIvnBQdFgVS6wJSQ321Pbj2R/fVh8XssBY/iygXrZL8+dmUEDo0H9QCGXyBrRZNULIUGhH4XaVKofSH62hR4mPW6pyYzFQjkinyzh4RWiqkWwbmeJ6B40zdwsV/j39IFoB8ZIWG/5ASQ0G9GSPL1UCjRbXaQxIaCzbY0oJcrKY49A5RQnHzm+icMLP1NKQyFA/aW1SJFaRdGSgjQj3ED6GBGCM9e0q0m0vEneAKks7774rAK4oI7AcZDo/tTf2AUrm7zuy0IOK+1ECmxgCa84P1g9Q7pJjVgz X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0389; 25:N7QmCCQPwU+jsUla6rFLHOLe6fcE/Oe9sjeI8/wER/xdmuISlNEThmZh96qJbugRxSHkYHJko1WcvN4UriEAuM/KmPQaDnw4bbcKS4ajJWRRXXrYQkT/3dHvdMlwAIV+Wgh9mVl0Ph6Tx8fL+6e/dAFwWVHKWsy3aqK92vnvxP8XJ+W6jQHdiGdXjOqq6vo9iG3UhiUCskpFlz8Vs9WtnNPw0ok1apPEgmeOEADMzrah2QY6/NatGG4qiZvf/DqM1ZT6am8QDTiN9+AiHRIHFHZfXKNofQxAIzeRC6+alEJDO7F90eTGMoteC+wLj7pic/3X51Pe9KVkJgr0qgLr8AsstW4zQnQMZwj/ywykijQzPujMbNf2mSCAfbMxtj62B/mPJ4JKB/ygWl7QojDmrGQLpO0gBn2uBCA05SUCXGI8IFzzlDfpnBac9Sn6X/i/aORDQxlq45VfJa0KYU++PGhFYbsb5WlSXT4w4P8reu0=; 31:nFaHGJinlCNwQHE2wadP60UfY7gX8ZxxJxoCzNtCQh6HGwtOXK3bRemgTJt0xODz0Gjk5j2G1IyLBzr8Lz0zebBcjOJPZgz3mCKXFECzSSD51zBM9LTXN45lja/Voyz00dvxW69GKjqGBAwXCHpDbTubaVpwVhtz+qafnFM461ugXjFVDKKCivMTI2NwKFh5aYtUyTFdamQ75iCS/09Eu39BBFG/yOwHg60+CgQT/OrVicnQ/zXah5SnbwBD6qHQ WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0389; 20:LzknK5E7iqh3rLpzf99MeuMq3h7oT865LI0AumzrmlWB542npNferDFiM3kWFaTQi8/8+xtWDYj3b9ouza4BvVQpKf/+M6IT+1ssP5F7ST/EStLsmngaOopLC63aocl92SryLNLYVAmQIppSmt++xmKVnFM3CRLANBDZo63kzmi3X19Oj+Zj5Kx7w1exQgd4S/obqHP2UNuOaKzDHCvFRl1JG+olGQw9X0X6DOerOxMjSEv3udFEqFvGcl9BhOlmlPtWPShtZUhn5WUFOKZSOxOIoxp+etTHzso6CMCiOuKfAiQ3Q32SKS35zHDd0oQEyY1F+Big2B+9Q3v5SeKqVGIaU7eZ5gsEulaj0xCSUokBxXiXb52X10D4OhW8wfBpaWMWyuNjD7lz6rfpMNfFOHIldoJNKI9Blp1+5hzqDlMPjQu31yiTAQA1/EwihGtN8zR82YnCy5Do4loXsCDHD+c+JGJ4WW8RYahxWcl7UpZWcdDXdLwEGLBFUri6Y2Ub X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(5005006)(8121501046)(13018025)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BN6PR04MB0389; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0389; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0389; 4:alpZIw9eZ3USWiXfNEkWxYFCGXWV59R9tPftn8D/mFWAGhqgDgvUf/1JxkLmnv8I05I4K+Nza8wNGhtlDXDygy4z/yWQUKjq+0yQOdjfqv8A035R5Q2jg2Z/NJuGdv3Pfg5GeuBfXLncyR29Hh5nQ1pofre36WFXD5Yxw4oQQTOty6y8v2chltYihD7chJQLJThxbZreC94zbKvl2NtQbnfqi852+j/znwAPkBOCmpSxbZ18pld+o7gJcTACly5GVMekWJTbEe5XgHFreZeob+0irKy4m0mltNYIqYdD1PmsJ2sEvfdHG+5wBqbbBkV7OKxr46ta2jsXQJnCNG1cMTMr0lDC5vmtNYG54aT3eYzMp8sqNmlRo+LZgiLiqHJvA9HFxRVpWR+VwxRJ61sZ4zW8Dwc/HZobEDZ2l4/VjhVZQGG14WrOYj+bas03J54h4uQ5KkatfZU+c7o5bdQ5mJ/mbNKJXvlxKkLZXm9n/z+OyDv77rxGxbeM8X6qklBKAKJOZ0KqZ1lU5WDf2QwQY+9aRs067Y+CgJeSzfWb36e1tH6Uh0fVDEWn9VJMWgv9a+rNdEsD9lr6+OHgHR1KXLRrXvPrfcsiX2rg7eBBuXQM+P20WhS3WGnDzk5unXn8ygriNDJ1IOyjz6dmydegkGRYk9aa65/J7LvQZlgydjtEN2aYj5SYm8vYqep9N+BSA54mtENYpLlG8oxxx070mgPHhNjQ9085p4X9eH04F+oS6aFy0aDiBmquRpitO1CdZyMfL5hpikU2QQlmKuh8hLIlFKXNNiOx9pS5jDhBfM7E8KwfwQdJImfkQlADdmWtSF/9sl0tjD/vDV4mV+uKk0QPuhftIjqHP/a54C1MqUObWsVYBzrZm514nRsigu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7e0g6VJKctbLHrDWbYUiQqpZCjau6wt5+Unjgw==; 24:hFGPdJ/II9cacvrR+G/8Nwc3LF72V12qyPFpc/9jciV9mk+iUD39BUs5aNG2HQdptNT2TLDDE8NGFqulAo354sdRABasd2me8d7vxgdzf9w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0389; 7:szCmZ0qDmQ2qwZg0EYrlSSJgNqQfWoHJoemar+7TKmrBxShbq0GC4oiNGdxlYA33Ftkcg7vYHPYwWdgzgitvf+WrePUOzP7LFDmIoawRxkbIekFSty4GpKhfh8DJDG5HiYpgguqSvEEnCKVMXv9xP16aWf15P3NqCJ/RpTOx6VeJjKWGUxkidQa/nze9XVkBr7a5cKhjNPSRCgEPPIL5s9kgheO2Sc+RmPRz5PQWHts1omHC3CCRyJCPUyztybDKjNaENTFHboBZjYTrPzLg9cc8uMaKPXAv7cG4sNJfG9PcbibEq0oOHih1dDjvSehL1Qnfu+uhSA03IetLvLcJjA==; 20:dZ0nqBB9ETJtbkTZzxZT/WiNEpJLy3EYdsd4brtpBi2xwnoBHQEJA+VFJdupKnHS1d7QF9INIAHWbjwIWiE06a7cLjl2a0VxREzAojwZge8/8UhtZA0goeUxaZJLyHPNk/GkTSMfZg1Vha9Jh8079nX5TvW6elBjWN4BYDdp1Jw= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 22:52:54.9945 (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: BN6PR04MB0389 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 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 Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Reviewed-by: Christoph Hellwig --- 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 c4e2afb9d12d..88aa460b2e8a 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -232,6 +232,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 488c6ca2ad91..b56cb3d9060f 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1274,6 +1274,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) @@ -1287,6 +1289,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); }