Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp7712imc; Thu, 10 Jan 2019 16:32:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN6rDujpIApdnOTxeRo2XTRsSUeERTI6kqF4fxstqSfMq7MVMgI6FNaxy3H1t54wfFsZpixc X-Received: by 2002:a63:dc0c:: with SMTP id s12mr11527947pgg.398.1547166720460; Thu, 10 Jan 2019 16:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547166720; cv=none; d=google.com; s=arc-20160816; b=jI0CMVTM8882Te4BAQqMsvOCA0fV9ADSWpzpzts6545aOcfcpxDlptgNHj89zOnUQe ksY7EaaMbpdkrOY6nSU5lPBeLnUkLDL1iksQnGQUNnbGBY8+uqtoY+5tewONm/cVFG32 N9eHMNjtkpxJWUTh6hZPEnlv83yaCLQY59W2C787/uXtHhgS8e68VwNwl2Myz9aCdHPs 4Q4O1WMxtvybZVLz253RPoCXqh/U2Z+XGWJB2zhofnBL96FK8uOv3nlYYeqq31xz20zV I5aErSAoAOuZof4JOQZb1VYRQmOJsIRUG17npkAOtOsk53h8OP6xECbXg5F3jtmuFXhp 6TuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/aCo7WsJ8RqeGyyBXg9MQtpaZUgJK1C27CinquA8p+E=; b=vNvOfHc6/p5i8zlU34o+bOm46dYMIWJR28AjNCCbGyg9R+lSk96C7+jb7WzPtHm9S7 A6aIDio7vih0BhJ+oNG8S6B3Ms19n9lF1BVmSdl0hgk8a6H5Jp6gSRohNSG/rVQdS89n yE1glNlpp4yXSlenkJLY9sA/lZcsOkwUW1AvYrLQe07REV8uOlDfmr4oyB4yrRtoig+4 EI7Js9pg9LRpVvBSGkmWld7ZcRz1sJ3CjAOFziEVXqsHAWbg/ugMXzv3WX5S7bZ3K1nE AlxyX+n33QAVyvxmGzgA3diGqPogVlPz6RYXAdHNd5RG4BFY6bNh1vi5Abcl4LleMnIF Nvaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jYq2j6qx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23si33752427pgj.247.2019.01.10.16.31.45; Thu, 10 Jan 2019 16:32:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jYq2j6qx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730141AbfAJXUz (ORCPT + 99 others); Thu, 10 Jan 2019 18:20:55 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45099 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728605AbfAJXUz (ORCPT ); Thu, 10 Jan 2019 18:20:55 -0500 Received: by mail-ed1-f68.google.com with SMTP id d39so11581331edb.12 for ; Thu, 10 Jan 2019 15:20:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/aCo7WsJ8RqeGyyBXg9MQtpaZUgJK1C27CinquA8p+E=; b=jYq2j6qxQrKNqXJ6j6xhKi2FfYj/K0fVxPpYfLB9UtLdlM2oIcnbUKJr9df7us4cIN K20HduduP2mGGi33Cg26MCjX58v5C/sl4eGzGRwWThGWQpH9+hU6LCOy0DKJLAwjT98h ZrI5e8RRmOfSxLLu+DFPpbZ3iZzHlFTpesMYI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/aCo7WsJ8RqeGyyBXg9MQtpaZUgJK1C27CinquA8p+E=; b=YUfS2RUHMbpv+hYuqTPYLygCpcw9WUKjvypghrmUK6LHVDEKfmrEtvLaKxayJGRUd9 AZXldqov4mgnpnIQ/+cKGZnre8fj8iC5pPs0kbmKajtLEUwMeocu7zmdB6/SS5gftZIP k9j9lXacS+57o+U6kDIAmD5ZLaNCugWQ67y+AuKzP5jufrn1s4mfDREyUqwso3ybFc5s ntublJB5+BcjSUkGXT6flaKBTzMeDyAusoDwlJR6Hcjw/d+qv88wbeJ+K/7nWSzoy6OE sp4hGBXfwUW20fxMIVka940ES6VY8RzFGa0JCBfaBNOlJz8DlhwLzrBW+uPUQchx23L0 +amA== X-Gm-Message-State: AJcUukeD2CBbIWwlWiVZnH0NPNcTyUZTeDpieGdZnZzjaQLLvyMo7QqW OB98TiA13koCZIrB+dLfm4C0vg== X-Received: by 2002:a05:6402:1286:: with SMTP id w6mr11547107edv.53.1547162453067; Thu, 10 Jan 2019 15:20:53 -0800 (PST) Received: from andrea ([89.22.71.151]) by smtp.gmail.com with ESMTPSA id c12sm1888336edi.52.2019.01.10.15.20.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 15:20:52 -0800 (PST) Date: Fri, 11 Jan 2019 00:20:45 +0100 From: Andrea Parri To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@kernel.org, stern@rowland.harvard.edu, parri.andrea@gmail.com, will.deacon@arm.com, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, willy@infradead.org Subject: Re: [PATCH RFC LKMM 7/7] tools/memory-model: Dynamically check SRCU lock-to-unlock matching Message-ID: <20190110232045.GA3908@andrea> References: <20190109210706.GA27268@linux.ibm.com> <20190109210748.29074-7-paulmck@linux.ibm.com> <20190110094131.GA11647@andrea> <20190110144049.GK1215@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190110144049.GK1215@linux.ibm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > I'm not all that exited about spreading version requirements in the > > source: we report this requirement in our README, and apparently we > > already struggle to keep this information up-to-date. So what about > > squashing something like the below (assume that 7.52 will be released > > by the time this patch hit mainline; if this won't be the case, we > > may consider using the development version 7.51+6)? notice that this > > also removes an (obsolete, at this point) comment from lock.cat. > > Sounds like a very good point to me! > > Should have pointers in the various files to the README file? Or maybe > get people used to using scripting that checks versions? Or maybe > after answering questions for some time, people will get used to > checking versions? As discussed off-list: I have no strong opinion on this regard, well, except that I think we ought to fix the README, somehow (consider my diff below as a first proposal). Akira actually preceded me on this and suggested another solution [1]. Andrea [1] http://lkml.kernel.org/r/04d15c18-d210-e3da-01e2-483eff135cb7@gmail.com > > Thanx, Paul > > > Andrea > > > > diff --git a/tools/memory-model/README b/tools/memory-model/README > > index 9d7d4f23503fd..b362a41358fa1 100644 > > --- a/tools/memory-model/README > > +++ b/tools/memory-model/README > > @@ -20,8 +20,8 @@ that litmus test to be exercised within the Linux kernel. > > REQUIREMENTS > > ============ > > > > -Version 7.49 of the "herd7" and "klitmus7" tools must be downloaded > > -separately: > > +Version 7.52 or higher of the "herd7" and "klitmus7" tools must be > > +downloaded separately: > > > > https://github.com/herd/herdtools7 > > > > diff --git a/tools/memory-model/linux-kernel.cat b/tools/memory-model/linux-kernel.cat > > index 95bf45f1215fc..8dcb37835b613 100644 > > --- a/tools/memory-model/linux-kernel.cat > > +++ b/tools/memory-model/linux-kernel.cat > > @@ -1,7 +1,5 @@ > > // SPDX-License-Identifier: GPL-2.0+ > > (* > > - * Requires herd version 7.51+6 or higher. > > - * > > * Copyright (C) 2015 Jade Alglave , > > * Copyright (C) 2016 Luc Maranget for Inria > > * Copyright (C) 2017 Alan Stern , > > diff --git a/tools/memory-model/lock.cat b/tools/memory-model/lock.cat > > index 305ded17e7411..a059d1a6d8a29 100644 > > --- a/tools/memory-model/lock.cat > > +++ b/tools/memory-model/lock.cat > > @@ -6,9 +6,6 @@ > > > > (* > > * Generate coherence orders and handle lock operations > > - * > > - * Warning: spin_is_locked() crashes herd7 versions strictly before 7.48. > > - * spin_is_locked() is functional from herd7 version 7.49. > > *) > > > > include "cross.cat" > > > > > > > > > + * > > > * Copyright (C) 2015 Jade Alglave , > > > * Copyright (C) 2016 Luc Maranget for Inria > > > * Copyright (C) 2017 Alan Stern , > > > diff --git a/tools/memory-model/linux-kernel.def b/tools/memory-model/linux-kernel.def > > > index 1d6a120cde14..0c3f0ef486f4 100644 > > > --- a/tools/memory-model/linux-kernel.def > > > +++ b/tools/memory-model/linux-kernel.def > > > @@ -49,7 +49,7 @@ synchronize_rcu_expedited() { __fence{sync-rcu}; } > > > > > > // SRCU > > > srcu_read_lock(X) __srcu{srcu-lock}(X) > > > -srcu_read_unlock(X,Y) { __srcu{srcu-unlock}(X); } > > > +srcu_read_unlock(X,Y) { __srcu{srcu-unlock}(X,Y); } > > > synchronize_srcu(X) { __srcu{sync-srcu}(X); } > > > > > > // Atomic > > > -- > > > 2.17.1 > > > > > >