Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp63403ybv; Wed, 19 Feb 2020 16:27:50 -0800 (PST) X-Google-Smtp-Source: APXvYqykW3kSkdX0kjo+x5Ote/jn4TF8i4fQxVIglNDJ0aH0OqKjWJYnVWtMzHKef5wpj2LTDyGX X-Received: by 2002:a05:6830:110a:: with SMTP id w10mr21881748otq.300.1582158470613; Wed, 19 Feb 2020 16:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582158470; cv=none; d=google.com; s=arc-20160816; b=sc/+DP4isk/5RC9lCiJSvna+gKMP4qLi+nOKA9uxtD8cqeSK3ltnJCD8MLH//8Hi6i wvitfvr7BxWEfb5HW2nIbj7Kjstgx+bBmwb+1/4x/5uxR9s24XjxKLn8n/I3Y5FM61Uk k1KKp6b63zxijK1LEqJptjdNYI0sU7du2ZnJdWQBwkQFcSK4nbFPeY5rWLA1gQhQNhHW zEsRksBEN/CwXmOzkTPHujZw4oEVR2KZ7x6fNJtxDUkpbMAGQyTwqXA9PQ7S0IOxM3Ph Z2jPiCdmL9DjBtqdeKlopcukKYXFJwqD0zB+O0E+NY3mOI5bWVfBBGAJSxBeMOid27OP YfIA== 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 :dkim-signature; bh=yBk+R8vCbSw5xpNQVNRg7HmG4Olx/oWqNTA9S4QsKz0=; b=wgn4E7B/roiTszpWoggZvgZoXhYmllJxEW3OvNrLAwkkJGI3+XnYBEmEvdpDdmPdso UOtsvQrIeH/2gvsSzsfajXdT1zka6uG/QSnM4quV0EZAuZJXOFrSuyf/+ZKaAKb+nLdS +GpASIi0hiVN9X3Pf6wIuBRg9zkRoDS7lKLMBx6YDLT/k9Bkl866O4FcX/PApzXIb7B5 VzlPkrxrzNWnToo6dUgECqIOGi97GMV92jh1LbG0kfyLoLdPSZnCu7qRsC567ag9rF1r gvyz7KK02zuuqdUabXgibdFoUCPJF2x3slXymhfdvapbbc0JL5USMWFxwTB0kASl/tah 7Ysg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rofXMqqG; 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=QUARANTINE 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 p5si736392oto.116.2020.02.19.16.27.37; Wed, 19 Feb 2020 16:27:50 -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=rofXMqqG; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727132AbgBTA1Y (ORCPT + 99 others); Wed, 19 Feb 2020 19:27:24 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44640 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726731AbgBTA1X (ORCPT ); Wed, 19 Feb 2020 19:27:23 -0500 Received: by mail-qk1-f195.google.com with SMTP id j8so1969306qka.11; Wed, 19 Feb 2020 16:27:23 -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; bh=yBk+R8vCbSw5xpNQVNRg7HmG4Olx/oWqNTA9S4QsKz0=; b=rofXMqqGIaLcHwa1DG5DkXkGjySQV4pFvsjSQerHl/4pTBIxj4RfCGmJC9d8P1kecz hzOu77VzsqDVsryL613Ih8cqnqbUZ6s566WLJ0j7CQmrzmXfGMtQPpIVgeFF1fkfRtp7 QnJqoJ5qWzP0wVprLzoX50IS4ncv0AewPPTQey1M8LZQyAD/nFCdj0ta/IUBIfgdp9iS xveLRcBygb3zfi8N6+JSqjeHvAXz4dUUhGpJZWXHo+kg91bWHUHNjfmm0fzBXJz5nabO ZmTSseTB7VmHOXqv7YU2BkTCrhBR7Lamq6+ZFtsllfJA0u2wwCrhTTThimUvDQWgSbwW AvlA== 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; bh=yBk+R8vCbSw5xpNQVNRg7HmG4Olx/oWqNTA9S4QsKz0=; b=Arh2RH3PQmmFTovat5S2zh9g8pdCfKoFGBw3IzxZ0TpWScljcbF63B9V0Tf+MTllKp De0bApXCfYKWcq33XcQGfJaDdQyzJI+9oeSkVausr9zLG3dNALDSF0NbC6I5WJ2oJyYm UvtSwaNO92ficlzdtmXpfzuTlCSjix/3039HMKWg6z+R7nX/yku1+dMWp3biAmarwJXU nsdUsf8gdwq3POhFL65dGyDNG9HGH4X+0Qq55kOpXmGRKRhyqd1CrsVlwHTTNqCGBjpo Vd6mkuuG4XmTXQH9tct0PTaTeEEGuxwhExuBrVXCJZ3YsxVKdvaNGOH3PkoQvhUTUI5T W39Q== X-Gm-Message-State: APjAAAXQgSJVfw3F8KAg7pl0I8gmBC0MpPKaQuQo7+TmpdOVDBr9o6R2 ouGpQp7r+t4heI2ohQ6vTJ8= X-Received: by 2002:a37:6393:: with SMTP id x141mr22771653qkb.134.1582158442595; Wed, 19 Feb 2020 16:27:22 -0800 (PST) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id r37sm889732qtj.44.2020.02.19.16.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2020 16:27:21 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id E2D1821B34; Wed, 19 Feb 2020 19:27:19 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 19 Feb 2020 19:27:19 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrkedugddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhunhcu hfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucfkphephedvrd duheehrdduuddurdejudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqd eiledvgeehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhl rdgtohhmsehfihigmhgvrdhnrghmvg X-ME-Proxy: Received: from localhost (unknown [52.155.111.71]) by mail.messagingengine.com (Postfix) with ESMTPA id 9E2E63280059; Wed, 19 Feb 2020 19:27:18 -0500 (EST) Date: Thu, 20 Feb 2020 08:27:17 +0800 From: Boqun Feng To: Alan Stern Cc: linux-kernel@vger.kernel.org, Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Jonathan Corbet , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , Greg Kroah-Hartman , Jonathan Cameron , linux-arch@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [RFC v2 3/4] Documentation/locking/atomic: Add a litmus test for atomic_set() Message-ID: <20200220002717.GG69864@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> References: <20200219062627.104736-4-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 19, 2020 at 10:07:09AM -0500, Alan Stern wrote: > On Wed, 19 Feb 2020, Boqun Feng wrote: > > > We already use a litmus test in atomic_t.txt to describe the behavior of > > an atomic_set() with the an atomic RMW, so add it into atomic-tests > > directory to make it easily accessible for anyone who cares about the > > semantics of our atomic APIs. > > > > Additionally, change the sentences describing the test in atomic_t.txt > > with better wording. > > One very minor point about the new working in atomic_t.txt: > > > diff --git a/Documentation/atomic_t.txt b/Documentation/atomic_t.txt > > index ceb85ada378e..d30cb3d87375 100644 > > --- a/Documentation/atomic_t.txt > > +++ b/Documentation/atomic_t.txt > > @@ -85,10 +85,10 @@ smp_store_release() respectively. Therefore, if you find yourself only using > > the Non-RMW operations of atomic_t, you do not in fact need atomic_t at all > > and are doing it wrong. > > > > -A subtle detail of atomic_set{}() is that it should be observable to the RMW > > -ops. That is: > > +A note for the implementation of atomic_set{}() is that it cannot break the > > +atomicity of the RMW ops. That is: > > This would be slightly better if you changed it to: "it must not break". > Got it. Indeed it's the better wording, thanks! Regards, Boqun > The comments in the litmus test and README file are okay as they stand. > > Alan >