Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp274340ybh; Tue, 21 Jul 2020 23:42:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaIOWjZF56/jzNV/rwwrckgWX2SRrZ3y6tzpzMdh2usi+z1R4QKXfJBwjctPuQUYmIgQAA X-Received: by 2002:a17:906:2bc7:: with SMTP id n7mr29344166ejg.96.1595400120318; Tue, 21 Jul 2020 23:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595400120; cv=none; d=google.com; s=arc-20160816; b=S74/rQwjysProvbWSPZ5OO8oUJf/gBSFVM/DHlZu7Sj35EOOQtYikiJEayIpQ4o3oR 7ReODorTkUtIrKVvX64FzbDjoXQYNniLTpmSXLi3sDAMK0IZmrHZZ7oAOkAuTYDh5iC4 x35P0MAnl8uZhfsFP9TBplvSLymmTumVy9LOTcF54KW1lu9HV9j6o6KEdTXxR7ahTZUD lGkw/R7af1Dhy7uyF0SgKCgtqeAjS+7iCk3/ecAtUCRsvBOnsp5aCbxjjjUeb+ChLLkj Az6B3ftW/vtsptsUf3P4nWxM0IT0jcJpYP5p1DnOFEVu4BYR32oUzBmV8etRDxDaHuep vosQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=55rpauAhzVgR6FwpmFAWLHbR2LAKN1/g2HefQPBweag=; b=kA48KZ/A83fL14BBHKyUWrRymP9xegMuXuZ7bNJBmfWPidBZLIxSOCBpVH3wygRdLQ UEba+SxTwDRE8bbH9sjNT0UJNu53eiSJ60ZZwxfdR4+FPmXb3MpEuLuiSznIBOgdaxFp jvagQNYKHQuv2LEquYDEOUKjP8Lw7PW7855yWc7V6Cg3j39p5uVYaD/CjXQzU74D79Q4 PHYWXE60f9DiuNp3FQc1EkIqAPGNNRnMZbL0ZfX6yzf/pSXb/jR2Vx6M07DouTQyD3qH JnRZnBQzTNClfnkQvLvPDfIGffSMnkTKuFKAlLcV5l082iZpyXHuAyYV1MB4QHv1eMus H7nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bfCFlN4c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ob20si12726890ejb.646.2020.07.21.23.41.37; Tue, 21 Jul 2020 23:42:00 -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; dkim=pass header.i=@kernel.org header.s=default header.b=bfCFlN4c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729247AbgGVGka (ORCPT + 99 others); Wed, 22 Jul 2020 02:40:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:41104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726736AbgGVGka (ORCPT ); Wed, 22 Jul 2020 02:40:30 -0400 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 434DF207BB; Wed, 22 Jul 2020 06:40:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595400029; bh=55rpauAhzVgR6FwpmFAWLHbR2LAKN1/g2HefQPBweag=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bfCFlN4c7KDwRBdE39U7N1CQ4rkmxW6dLv3QRIJBm7tysVXNSYXrrADHWkQVTdGY5 udhKexSMH67kL4chrrmere0bkLniTVuatZddM8P7l5dJRxWVbiO2b5DBr6B4dJmL8P BDydbKc5GQE1ZiWqILnZZ/HW+t3muU4Xf8RvRrSI= Received: by mail-lj1-f173.google.com with SMTP id j11so1263308ljo.7; Tue, 21 Jul 2020 23:40:29 -0700 (PDT) X-Gm-Message-State: AOAM5309RuYCj94vcl+dy3wTmFOuqsu9BrCikyMJvOQTyLhU/sJg6pf2 7bCJunMVKeYWEKPbBFUIuVIJxsR6ALRXogg6zq0= X-Received: by 2002:a2e:9996:: with SMTP id w22mr15651735lji.446.1595400027569; Tue, 21 Jul 2020 23:40:27 -0700 (PDT) MIME-Version: 1.0 References: <20200519214547.352050-1-a.darwish@linutronix.de> <20200720155530.1173732-1-a.darwish@linutronix.de> <20200720155530.1173732-20-a.darwish@linutronix.de> In-Reply-To: <20200720155530.1173732-20-a.darwish@linutronix.de> From: Song Liu Date: Tue, 21 Jul 2020 23:40:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 19/24] raid5: Use sequence counter with associated spinlock To: "Ahmed S. Darwish" Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , "Paul E. McKenney" , "Sebastian A. Siewior" , Steven Rostedt , LKML , linux-raid Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 8:57 AM 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 Acked-by: Song Liu