Received: by 10.223.164.202 with SMTP id h10csp4019108wrb; Mon, 20 Nov 2017 08:36:25 -0800 (PST) X-Google-Smtp-Source: AGs4zMYxTFboZm4xNlhYVhRLtPkm+a1/wtGJrQNVnJ98SSmU/hNYli11UcFVT0WqmwsdHqb1nvBb X-Received: by 10.98.163.73 with SMTP id s70mr11754774pfe.64.1511195785340; Mon, 20 Nov 2017 08:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511195785; cv=none; d=google.com; s=arc-20160816; b=g5b+C079H0vxYmHSIhCqQb4nvSKAvCdrpVNJqdAO+iZDx5U27ig/vQHqJl+6MlkuLC 3ILDP0WaokueHJ2iwRDH9sXFPJoPf2UaZ8lQw5UvPSGr3su0RgzmqgpqCL/Wic0RgC0C O3JcrvJ3dF7BKehz8djhG64+vQSst5+fNOmgXQqvReSFOC03VaRpjRkV/F6AepYNXSX8 RM9FmG1GubQ5N241vqMI4Kxf0KPuV8Y4N9CvOXko7BHM2wdj/PTpseKT3U5jE5LFyjjy oOq9jHfjDDWTIlpMzaXtD7WUGnBHf0ZfNLd7nniJY99+MfD1po8zKco4CGSH195Nz0e0 V/Ng== 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:arc-authentication-results; bh=hVPy3YMrTt7xBUiYh74k2lNYjRSl0il/eQ46rJ1dKWc=; b=FLXqGYpb2JHzMwJHFKsD4xpQJSYQzl4/lIl0qcDTIbzx4F+wJXNJQZilofB02K8oEH GIcIeYw4n88BnI+rzZPy4FiB8BXNGoFMBFFqXGntOwCO1Lt5aBvl75F5cVSFC5sTKAxP WDnV+w5ECOZ5WFajl+UYonQR9a/MxAAOtf0rs/H8v5NlcK8e8OsjuLjx/Fjp76WSxc0m HMr4EpLxF4ktAGyI7gbEf5wIDzLE/ZzF2zdGIrU/NItHCHu7cA3BYkp5LO/InnaIr6Co cUEpw+tUngmW7YskNZrxdhfrh5Yz9Bs3KP3Z1iA9g2OHulPKJOSoomdsNptuEI1KQJKo wbrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KXHhFxUO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u26si9267224pfh.388.2017.11.20.08.36.15; Mon, 20 Nov 2017 08:36:25 -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=@gmail.com header.s=20161025 header.b=KXHhFxUO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701AbdKTQfX (ORCPT + 66 others); Mon, 20 Nov 2017 11:35:23 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:43902 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbdKTQfV (ORCPT ); Mon, 20 Nov 2017 11:35:21 -0500 Received: by mail-wr0-f194.google.com with SMTP id u40so8597343wrf.10 for ; Mon, 20 Nov 2017 08:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hVPy3YMrTt7xBUiYh74k2lNYjRSl0il/eQ46rJ1dKWc=; b=KXHhFxUOTlN9Nzdjnhd6UFsAbKucgqRqEUTLpVJV5c3onFEG85xmXlqcSVQFhExZBj rw/WUoBd1emEbk/0QmG4Brw6Kj87jjyOerNqEkUwqsd6k1lFYlzZ8d9BC5Nx50GnjxNO WKkwZQVXMlKtoglKSk2r9zNSzjZvxf7NPCDui/9ULe2i+EheJ2xN02WF6E+Vcu0Rz0Kn Zs/HZx25AXBPp+n3T2q7hjPI4ffnn7KhVWPAOqyes/coPlfph6EcyHdPTAq7e89AvnUO HpQDjAoUjbCqCyTxHFv08k72xl7umw7fKKmARgbHZ64Mg5lIPTjlST9cFWsY8VC9tjwf OKGA== 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=hVPy3YMrTt7xBUiYh74k2lNYjRSl0il/eQ46rJ1dKWc=; b=rFffd/PbcbExX/nqseTNK0/lUlGDdKqcU5I5IW+Y2s4UcHHcJquHUuO2Scw0s25B7K dk0kufJzGeUCM/IIgy5/gk68mDHGWKIW42psnXrvZnIG2FixyLbsN+Fmmp3JxdHW9jda 74cFtbtCYz2etkAyyD9rOfdW7VOMQFHoWpmVDDmIEEAbqmBnjnmCJZ1FkTXjEwczBfs1 e9MxKXwSkrOCM+RKrs2HItbUH252Ty31y2jRA5mGlJl09UPG8YjlFP6d7vo9VLGVklBo cupqxQMePaPZo/viVSvoJl66XgTSLln81Zddz4vKBBE1rk4nC9aJ1U4M2AhKeIsC/ZLy Ka9Q== X-Gm-Message-State: AJaThX5QQVc3Vu+NRlogXBPk/cyOxHZL0PlbjgNV75BLtLe8SVYJmFFf WM0s/ujHHz0RC/emuho8PHA= X-Received: by 10.223.172.226 with SMTP id o89mr2445232wrc.197.1511195720160; Mon, 20 Nov 2017 08:35:20 -0800 (PST) Received: from andrea ([213.209.242.222]) by smtp.gmail.com with ESMTPSA id u33sm9754102wrb.68.2017.11.20.08.35.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 08:35:19 -0800 (PST) Date: Mon, 20 Nov 2017 17:35:04 +0100 From: Andrea Parri To: Boqun Feng Cc: "Paul E. McKenney" , Alan Stern , Peter Zijlstra , will.deacon@arm.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, linux-kernel@vger.kernel.org, elena.reshetova@intel.com Subject: Re: Prototype patch for Linux-kernel memory model Message-ID: <20171120163343.GA5842@andrea> References: <20171114075925.apzztfksn4f4y5ue@hirez.programming.kicks-ass.net> <20171114171505.GS3624@linux.vnet.ibm.com> <20171115163749.GA8555@linux.vnet.ibm.com> <20171117112746.GB6719@tardis> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171117112746.GB6719@tardis> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 17, 2017 at 07:27:46PM +0800, Boqun Feng wrote: > On Wed, Nov 15, 2017 at 08:37:49AM -0800, Paul E. McKenney wrote: > > On Tue, Nov 14, 2017 at 09:15:05AM -0800, Paul E. McKenney wrote: > > > On Tue, Nov 14, 2017 at 10:19:21AM -0500, Alan Stern wrote: > > > > On Tue, 14 Nov 2017, Peter Zijlstra wrote: > > > > > > > > > On Mon, Nov 13, 2017 at 10:40:31AM -0800, Paul E. McKenney wrote: > > > > > > commit 82a1431549b4eae531e83298fd72cd0acea08540 > > > > > > Author: Paul E. McKenney > > > > > > Date: Mon Nov 13 10:30:07 2017 -0800 > > > > > > > > > > > > tools: Automate memory-barriers.txt; provide Linux-kernel memory model > > > > > > > > > > > > There is some reason to believe that Documentation/memory-barriers.txt > > > > > > could use some help, and a major purpose of this patch is to provide > > > > > > that help in the form of a design-time tool that can produce all valid > > > > > > executions of a small fragment of concurrent Linux-kernel code, which is > > > > > > called a "litmus test". This tool's functionality is roughly similar to > > > > > > a full state-space search. Please note that this is a design-time tool, > > > > > > not useful for regression testing. However, we hope that the underlying > > > > > > Linux-kernel memory model will be incorporated into other tools capable > > > > > > of analyzing large bodies of code for regression-testing purposes. > > > > > > > > > > > > The main tool is herd7, together with the linux-kernel.bell, > > > > > > linux-kernel.cat, linux-kernel.cfg, linux-kernel.def, and lock.cat files > > > > > > added by this patch. The herd7 executable takes the other files as input, > > > > > > and all of these files collectively define the Linux-kernel memory memory > > > > > > model. A brief description of each of these other files is provided > > > > > > in the README file. Although this tool does have its limitations, > > > > > > which are documented in the README file, it does improve on the version > > > > > > reported on in the LWN series (https://lwn.net/Articles/718628/ and > > > > > > https://lwn.net/Articles/720550/) by supporting locking and arithmetic, > > > > > > including a much wider variety of read-modify-write atomic operations. > > > > > > Please note that herd7 is not part of this submission, but is freely > > > > > > available from http://diy.inria.fr/sources/index.html (and via "git" > > > > > > at https://github.com/herd/herdtools7). > > > > > > > > > > > > A second tool is klitmus7, which converts litmus tests to loadable > > > > > > kernel modules for direct testing. As with herd7, the klitmus7 > > > > > > code is freely available from http://diy.inria.fr/sources/index.html > > > > > > (and via "git" at https://github.com/herd/herdtools7). > > > > > > > > > > > > Of course, litmus tests are not always the best way to fully understand a > > > > > > memory model, so this patch also includes Documentation/explanation.txt, > > > > > > which describes the memory model in detail. In addition, > > > > > > Documentation/recipes.txt provides example known-good and known-bad use > > > > > > cases for those who prefer working by example. > > > > > > > > > > > > This patch also includes a few sample litmus tests, and a great many > > > > > > more litmus tests are available at https://github.com/paulmckrcu/litmus. > > > > > > > > > > > > Signed-off-by: Alan Stern > > > > > > Signed-off-by: Andrea Parri > > > > > > Signed-off-by: Will Deacon > > > > > > Signed-off-by: Peter Zijlstra > > > > > > Signed-off-by: Boqun Feng > > > > > > Signed-off-by: Nicholas Piggin > > > > > > Signed-off-by: David Howells > > > > > > Signed-off-by: Jade Alglave > > > > > > Signed-off-by: Luc Maranget > > > > > > Signed-off-by: "Paul E. McKenney" > > > > > > Cc: > > > > > > > > > > So I think that SoB chains like that are utter crap. I think you meant > > > > > to have all but the one from you be an Ack or similar. > > > > > > > > That's right. Git doesn't understand the concept of multiple > > > > authorship. Accepted practice is to have one Signed-off-by line and a > > > > bunch of Acked-by or Reviewed-by tags. > > > > > > > > When there's a chain of Signed-off-by tags, it means the first person > > > > was the author, who submitted it to the second person's tree, and it > > > > went from there to the third person's tree, etc. (which would imply > > > > multiple levels of maintainers and submaintainers). > > > > > > I could add a paragraph just before the Signed-off-by/Acked-by/etc. > > > block describing the roles and contributions, convert the people who > > > were directly involved to Reviewed-by and everyone else to Acked-by > > > (unless they explicitly provided a Reviewed-by). > > > > > > Would that work, or does someone have a better approach? > > > > How about using the shiny new "Co-Developed-by"? > > https://marc.info/?l=linux-kernel&m=151083859723653&w=2 This seems to be exactly what we were looking for/we needed. Altought still undocumented in "mainline", the tag has already found some uses in the past, and it appears in its commit log. I've just modified com- mit-log.txt in the "memory-model" repo. to adopt this tag. > > Besides, as you know, I've been following and learning a lot from this > model from maybe very beginning, and I have read throught the documents > and cat files, and even got a chance to verify some RCU-involved code > with Andrea using this model ;-) So feel free to add: > > Reviewed-by: Boqun Feng Added. Thanks, Andrea > > Regards, > Boqun > > > Hearing no objections, here is an updated prototype patch. Thank you > > all for the review, comments, and updates! > > > > Thanx, Paul > > > > ------------------------------------------------------------------------ > > > > commit 869b3c396eb908e3dfafbd75ed33421b3bcd50bf > > Author: Paul E. McKenney > > Date: Mon Nov 13 10:30:07 2017 -0800 > > > > tools: Automate memory-barriers.txt; provide Linux-kernel memory model > > > > There is some reason to believe that Documentation/memory-barriers.txt > > could use some help, and a major purpose of this patch is to provide > > that help in the form of a design-time tool that can produce all valid > > executions of a small fragment of concurrent Linux-kernel code, which is > > called a "litmus test". This tool's functionality is roughly similar to > > a full state-space search. Please note that this is a design-time tool, > > not useful for regression testing. However, we hope that the underlying > > Linux-kernel memory model will be incorporated into other tools capable > > of analyzing large bodies of code for regression-testing purposes. > > > > The main tool is herd7, together with the linux-kernel.bell, > > linux-kernel.cat, linux-kernel.cfg, linux-kernel.def, and lock.cat files > > added by this patch. The herd7 executable takes the other files as input, > > and all of these files collectively define the Linux-kernel memory memory > > model. A brief description of each of these other files is provided > > in the README file. Although this tool does have its limitations, > > which are documented in the README file, it does improve on the version > > reported on in the LWN series (https://lwn.net/Articles/718628/ and > > https://lwn.net/Articles/720550/) by supporting locking and arithmetic, > > including a much wider variety of read-modify-write atomic operations. > > Please note that herd7 is not part of this submission, but is freely > > available from http://diy.inria.fr/sources/index.html (and via "git" > > at https://github.com/herd/herdtools7). > > > > A second tool is klitmus7, which converts litmus tests to loadable > > kernel modules for direct testing. As with herd7, the klitmus7 > > code is freely available from http://diy.inria.fr/sources/index.html > > (and via "git" at https://github.com/herd/herdtools7). > > > > Of course, litmus tests are not always the best way to fully understand a > > memory model, so this patch also includes Documentation/explanation.txt, > > which describes the memory model in detail. In addition, > > Documentation/recipes.txt provides example known-good and known-bad use > > cases for those who prefer working by example. > > > > This patch also includes a few sample litmus tests, and a great many > > more litmus tests are available at https://github.com/paulmckrcu/litmus. > > > > This patch was the result of a most excellent collaboration founded > > by Jade Alglave and also including Alan Stern, Andrea Parri, and Luc > > Maranget. For more details on the history of this collaboration, please > > refer to the Linux-kernel memory model presentations at 2016 LinuxCon EU, > > 2016 Kernel Summit, 2016 Linux Plumbers Conference, 2017 linux.conf.au, > > or 2017 Linux Plumbers Conference microconference. > > > > Reviewed-by: Alan Stern > > Reviewed-by: Andrea Parri > > Reviewed-by: Jade Alglave > > Reviewed-by: Luc Maranget > > Signed-off-by: "Paul E. McKenney" > > Acked-by: Will Deacon > > Acked-by: Peter Zijlstra > > Acked-by: Boqun Feng > > Acked-by: Nicholas Piggin > > Acked-by: David Howells > > Acked-by: "Reshetova, Elena" > > Cc: > > > [...] From 1584345880530338329@xxx Fri Nov 17 20:19:34 +0000 2017 X-GM-THRID: 1583977336012014895 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread