Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp466099ybf; Wed, 26 Feb 2020 16:41:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxk7kapxfK0HPMsyRE7MkQDa5kJQwKvJxUjT7hQntsmAZCBAfv29F/JResAz6XEjxiCYMNg X-Received: by 2002:aca:5d57:: with SMTP id r84mr1402030oib.42.1582764084261; Wed, 26 Feb 2020 16:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582764084; cv=none; d=google.com; s=arc-20160816; b=aY6THgrgHKgA8I7WrN/QgeQx5nj/IAEiM9zdZ0NYtVPqblnY69CgH9P9tDDxTBJmwV hNoN2YRVGm/FXCEZCKLTjFLvLipTZ69uSWc0Zh/IN2jekv3tit8d21icmAJT26VatKvD GZUrIBmKqDpGeCp/zHyKvSkbZ74r8GRGLnhq8PxaqHW9hztLC4Fb1TLTMV9yiK5E8uRD iMBPiFZVwazvcHZOqmKTpMsOAemHWcZL4+Qcu3HzzlSfViw+eYYH+DZu/Tibrpir3OYM sXRaUlz4ACV3pStzryExCfqGWKAuYqz5p+ThZ+0f6f2MmO1IyM0BKlXqGNd7Ol2AwlOh et3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+OdPtLBop+fC+UYcJhsj8xgvQ6AFBIgkeZOtZL006YA=; b=FKnxSoSXnSTLmXcUfwnZmk/Rj5filhpUqle3f7+yqtf+1ZMJjqGFN9Le4TZXguNmSB gP80eVWM6vDg0oKGREG/n8oV3tvxP/PKDBrji3Ut0ZqvqXniWdYvxLby0I9elc5iPl8C vv0OeyPsaQ/Rc2mxsh1YUFCHlkVMpzSmK0byC4HZr2eH74m8pEN7bLEmSzV6vA39LiXe 92twRACjOKm5z6HhbdmuMQrt5vVOR+i8q7uk/0zTW0o7RGHmnD+MHKxxhNvGBkQlLAss XqovBqujHHjBJ6APSqhLzKdvBtfmebhJKhNCpbbLuY838MjSBLWQAQb64bvB6KT4jQd/ 2RkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Evu0pvTu; 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 p22si639149otq.132.2020.02.26.16.41.12; Wed, 26 Feb 2020 16:41:24 -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=Evu0pvTu; 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 S1728091AbgB0AlF (ORCPT + 99 others); Wed, 26 Feb 2020 19:41:05 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:39473 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727987AbgB0AlF (ORCPT ); Wed, 26 Feb 2020 19:41:05 -0500 Received: by mail-qk1-f195.google.com with SMTP id e16so1521331qkl.6; Wed, 26 Feb 2020 16:41:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+OdPtLBop+fC+UYcJhsj8xgvQ6AFBIgkeZOtZL006YA=; b=Evu0pvTuDu5Cnqs7pLtSruDmtez5tqpYKV4/So80R/WTbqrDCje7SHf5ICzXJUVzeP jwWhO+zTNZwkHIFFHwMe79GR4R30pInqmUlvZltzF5gqRhwL/0+FgUlIFYu5qZlws5HQ pCREjbBhQnT//Jtxz+wyw59hmFEEBuTD6CcyV6u///7RvfccIZPn+B95W+xGHUZb0U1T G8Ru1+1l+elTr1FSLVCpeLbPTlUlcI+D3SxqkEha8XG7aCxYjpV6qb/aXPqV34sVfSPj 02blhWdIeEIBxY2dyW/7GbeFJgB3Vz8z23d605/zYJi2mFoluVr+5wgDEhKdXCLmnjgU mtJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+OdPtLBop+fC+UYcJhsj8xgvQ6AFBIgkeZOtZL006YA=; b=JyRKQb0ZfNuenndd5MIuNLNpBRz74ILDn8xvf5MJ3nhKVy11m1U2P6qjxMLh2p/BR2 aF2hdmZRFpzsl/o0Nb2Xuj6mCM6AyqirOICe6JttnnMKI2XehWlczcjLd+MtO73JDQrL a/h4jahkAUV/JmiV6TYxoJNlKlU/t/DY00SwxlXEjMy2tTdcjjUslHhEXjh8jdcic/wB e9+Uup7snbak/6NWvEd595YIo9fAjN26QiXugfNKFVLw80gVBLvLQsX/WWTegt+BiEWp RYfdlBdJjo27s4UH+4w2LRwb6lsIjT2f79o668F89erc6P8yP60ChYf7ywxx3hXKS3/+ WqEQ== X-Gm-Message-State: APjAAAWxNEXbF8frTtsVs7cz6Qo9arSCUOTDgsGN8kkUWCVQfps/qERr uPWur5SXfYgZfLMVpb62IGA= X-Received: by 2002:a37:e409:: with SMTP id y9mr2374269qkf.352.1582764063541; Wed, 26 Feb 2020 16:41:03 -0800 (PST) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id w21sm2251344qth.17.2020.02.26.16.41.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 16:41:02 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id 46E1A21F8E; Wed, 26 Feb 2020 19:41:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 26 Feb 2020 19:41:02 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrleehgddvjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhunhcu hfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucfkphephedvrd duheehrdduuddurdejudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqd eiledvgeehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhl rdgtohhmsehfihigmhgvrdhnrghmvg X-ME-Proxy: Received: from localhost (unknown [52.155.111.71]) by mail.messagingengine.com (Postfix) with ESMTPA id BC3463060FCB; Wed, 26 Feb 2020 19:41:01 -0500 (EST) From: Boqun Feng To: linux-kernel@vger.kernel.org Cc: Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , 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: [PATCH v3 1/5] tools/memory-model: Add an exception for limitations on _unless() family Date: Thu, 27 Feb 2020 08:40:45 +0800 Message-Id: <20200227004049.6853-2-boqun.feng@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200227004049.6853-1-boqun.feng@gmail.com> References: <20200227004049.6853-1-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to Luc, atomic_add_unless() is directly provided by herd7, therefore it can be used in litmus tests. So change the limitation section in README to unlimit the use of atomic_add_unless(). Cc: Luc Maranget Signed-off-by: Boqun Feng --- tools/memory-model/README | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/memory-model/README b/tools/memory-model/README index fc07b52f2028..409211b1c544 100644 --- a/tools/memory-model/README +++ b/tools/memory-model/README @@ -207,11 +207,15 @@ The Linux-kernel memory model (LKMM) has the following limitations: case as a store release. b. The "unless" RMW operations are not currently modeled: - atomic_long_add_unless(), atomic_add_unless(), - atomic_inc_unless_negative(), and - atomic_dec_unless_positive(). These can be emulated + atomic_long_add_unless(), atomic_inc_unless_negative(), + and atomic_dec_unless_positive(). These can be emulated in litmus tests, for example, by using atomic_cmpxchg(). + One exception of this limitation is atomic_add_unless(), + which is provided directly by herd7 (so no corresponding + definition in linux-kernel.def). atomic_add_unless() is + modeled by herd7 therefore it can be used in litmus tests. + c. The call_rcu() function is not modeled. It can be emulated in litmus tests by adding another process that invokes synchronize_rcu() and the body of the callback -- 2.25.0