Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3357221ybt; Tue, 30 Jun 2020 00:13:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqpSKGpEbS0ZNPI7MJh8K3kPlZHxvyDoYaB+rMGOmz/uhu49bSOEWa/DAVHndk+nJeCbvd X-Received: by 2002:a05:6402:1346:: with SMTP id y6mr21676905edw.192.1593501225754; Tue, 30 Jun 2020 00:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593501225; cv=none; d=google.com; s=arc-20160816; b=aMwIDL4YH05xzwbbfI1kvS7UnAhC9yD2x4z2xpqa/DLP8d9gxdACZ3iroiwIJ4yRP7 IwpSUILAFLbjLuei/iyKeAhwwtUiLncLUeQtYvGUSKhp6mL6EvL3VKw6nXXexTbDfd68 9G7I4b+zJ79hcD5CBjNW5oMFBkV9r7IrC5+si7Kk1yEkSJFFfIbRo7T2weFSCXCui7a9 ETZCRWHyioz5UZQeYbaB0UUEjYDEbUxOzMpIxzgqIS+4pmlzsm00m9tO8Z4+uXNgVeAy 4muymhcmQe+2nA0+6vNrcIw1sSW3A3/vGw5CW4o/p6qdFLAUdS7rDXDwXLKLZwi/kNHi 54QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SiA5TT0sq0Mkz2Iw1ZGxpWWQLlwxAjNtYYZbr95PFjY=; b=g2XCPZWetgTtQimSCvesobw9DIfWVwu8AyDyJxeThJOdT8unFLa80qTKWDag3qpl1M v32L6RXuPTFSFbAkXLTuAOSeY2EjFrGKM80dlx0blPXIJ7Gq7QoCDyBlw3aw0PRi2l1w 45rTxe+m9lrChbijz2UM7wIMw5KkjnCBPgamhsiRFstbL8rcZfXMPsRGQXOpYFlaavl7 KTwapwc0kHxNuGCkiYm5a0Y7Gid2frxW8aaSMcVhO3cfhsxZSq+7hTtisMMw4cX3tSWu 4vN1FSSFNiDZWrkHMBqZZxAV6gp79sb4i0rJK+Z0JxZ7kkDIqnJHYJ4vKECBMHpecSO3 OB6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k91si1201991edc.296.2020.06.30.00.13.23; Tue, 30 Jun 2020 00:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730760AbgF3HMC (ORCPT + 99 others); Tue, 30 Jun 2020 03:12:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:41342 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730637AbgF3HMC (ORCPT ); Tue, 30 Jun 2020 03:12:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B5E4FAAC5; Tue, 30 Jun 2020 07:12:00 +0000 (UTC) Date: Tue, 30 Jun 2020 09:11:59 +0200 From: Daniel Wagner To: "Ahmed S. Darwish" Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , "Paul E. McKenney" , "Sebastian A. Siewior" , Steven Rostedt , LKML , Jens Axboe , linux-block@vger.kernel.org Subject: Re: [PATCH v3 16/20] iocost: Use sequence counter with associated spinlock Message-ID: <20200630071159.llgfzs3n4xekexcw@beryllium.lan> References: <20200519214547.352050-1-a.darwish@linutronix.de> <20200630054452.3675847-1-a.darwish@linutronix.de> <20200630054452.3675847-17-a.darwish@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200630054452.3675847-17-a.darwish@linutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2020 at 07:44:48AM +0200, Ahmed S. Darwish wrote: > A sequence counter write side critical section must be protected by some > form of locking to serialize writers. A plain seqcount_t does not > contain the information of which lock must be held when entering a write > side critical section. > > Use the new seqcount_spinlock_t data type, which allows to associate a > spinlock with the sequence counter. This enables lockdep to verify that > the spinlock used for writer serialization is held when the write side > critical section is entered. > > If lockdep is disabled this lock association is compiled out and has > neither storage size nor runtime overhead. > > Signed-off-by: Ahmed S. Darwish Reviewed-by: Daniel Wagner