Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8224614imu; Thu, 15 Nov 2018 08:21:53 -0800 (PST) X-Google-Smtp-Source: AJdET5dWweFfAGHc7LcYwmlk+ltAsqmSQ+XmCZfiLvfx24wBB9n9txAdKGvwr/dUB8M2X9+LuAix X-Received: by 2002:a62:e044:: with SMTP id f65mr7072329pfh.208.1542298913376; Thu, 15 Nov 2018 08:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542298913; cv=none; d=google.com; s=arc-20160816; b=JIPJPuNYSsBmea/rkM7Wx75g332bXMo38/wThCVOO8ZP3tlMjLs3sE87jChYrSnPUC gvFfnJCbRh6xHhTIx1cPPzrOHrHiFRkdePPFWvAH/rgiA7LpF7uuKQ7G8Dw2r8zzTAGr grG3iZaU1OgcIgZXNImZiQ0YHpunkOyGOvLNT4rrygxfdp/NV2OG8CJWZBZQ1nKnyCvY 98aKnR1ESCU2s2/PBqLVJvfBLRpMrj0dSs3aCDv9HPLMcyMJ06SiRfR0NoQ+uAGB6mKG NuJQPZuKBf++8N+1UuZoa7EDe8BPDJBqh7HpQ2M/CA6j5Tu12rJhuqkJpwBjfIIOwa9u TjRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:subject:cc:to :from:date; bh=IcN/sQUkI3zei0hH8KGR5+FrvatP59wpkuOYBVflK38=; b=cvhHtoBLkveT2jgI89tHfYUnqjWeXfOWNXV4KTc7IoT+l25bkP2NnjC+K90U8zmtkv jlm23o4xlBJMkKQYqV607Rrsfn/y6R1vpLECeg9BeHmQPCJuEikKtpMZC+Nw3YL+Yuuj l4iAwlYfWe1dTnhQEAcu6UrD7Nv4NncD9RjjZvSzjo6OQemQ6j6DKuZju9fRbjZNpQH3 jJ1u7Kh9RLXWFb6jiHT9XIdz4jE4TjJ/UfvBfFyYHlZIHoGBaiK6Uk1UcRfgZUoLc1Vn B8bO8ICgbdWJUqq+AlZRats9jAABF6CzJpUf51trgxB/Jmy/O9DOgoUaAi6A/gGyxZjZ tlnQ== ARC-Authentication-Results: i=1; mx.google.com; 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 1-v6si29422244plj.53.2018.11.15.08.21.18; Thu, 15 Nov 2018 08:21:53 -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; 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 S2388589AbeKPC2N (ORCPT + 99 others); Thu, 15 Nov 2018 21:28:13 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:43732 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1729034AbeKPC2N (ORCPT ); Thu, 15 Nov 2018 21:28:13 -0500 Received: (qmail 2955 invoked by uid 2102); 15 Nov 2018 11:19:44 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 15 Nov 2018 11:19:44 -0500 Date: Thu, 15 Nov 2018 11:19:44 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Paul E. McKenney" cc: LKMM Maintainers -- Akira Yokosawa , Andrea Parri , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Peter Zijlstra , Will Deacon , Kernel development list Subject: [PATCH 1/3] tools/memory-model: Rename some RCU relations Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for adding support for SRCU, rename "crit" to "rcu-rscs", rename "rscs" to "rcu-rscsi", and remove the restriction to only the outermost level of nesting. The name change is needed for disambiguating RCU read-side critical sections from SRCU read-side critical sections. Adding the "i" at the end of "rcu-rscsi" emphasizes that the relation is inverted; it links rcu_read_unlock() events to their corresponding preceding rcu_read_lock() events. The restriction to outermost nesting levels was never essential; it was included mostly to show that it could be done. Rather than add equivalent unnecessary code for SRCU lock nesting, it seemed better to remove the existing code. Signed-off-by: Alan Stern --- tools/memory-model/linux-kernel.bell | 9 +++------ tools/memory-model/linux-kernel.cat | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) Index: usb-4.x/tools/memory-model/linux-kernel.bell =================================================================== --- usb-4.x.orig/tools/memory-model/linux-kernel.bell +++ usb-4.x/tools/memory-model/linux-kernel.bell @@ -34,7 +34,7 @@ enum Barriers = 'wmb (*smp_wmb*) || instructions F[Barriers] (* Compute matching pairs of nested Rcu-lock and Rcu-unlock *) -let matched = let rec +let rcu-rscs = let rec unmatched-locks = Rcu-lock \ domain(matched) and unmatched-unlocks = Rcu-unlock \ range(matched) and unmatched = unmatched-locks | unmatched-unlocks @@ -46,8 +46,5 @@ let matched = let rec in matched (* Validate nesting *) -flag ~empty Rcu-lock \ domain(matched) as unbalanced-rcu-locking -flag ~empty Rcu-unlock \ range(matched) as unbalanced-rcu-locking - -(* Outermost level of nesting only *) -let crit = matched \ (po^-1 ; matched ; po^-1) +flag ~empty Rcu-lock \ domain(rcu-rscs) as unbalanced-rcu-locking +flag ~empty Rcu-unlock \ range(rcu-rscs) as unbalanced-rcu-locking Index: usb-4.x/tools/memory-model/linux-kernel.cat =================================================================== --- usb-4.x.orig/tools/memory-model/linux-kernel.cat +++ usb-4.x/tools/memory-model/linux-kernel.cat @@ -95,7 +95,7 @@ acyclic pb as propagation * onward on the one hand and from the rcu_read_unlock() backwards on the * other hand. *) -let rscs = po ; crit^-1 ; po? +let rcu-rscsi = po ; rcu-rscs^-1 ; po? (* * The synchronize_rcu() strong fence is special in that it can order not @@ -109,10 +109,10 @@ let rcu-link = hb* ; pb* ; prop * critical sections (joined by rcu-link) acts as a generalized strong fence. *) let rec rcu-fence = gp | - (gp ; rcu-link ; rscs) | - (rscs ; rcu-link ; gp) | - (gp ; rcu-link ; rcu-fence ; rcu-link ; rscs) | - (rscs ; rcu-link ; rcu-fence ; rcu-link ; gp) | + (gp ; rcu-link ; rcu-rscsi) | + (rcu-rscsi ; rcu-link ; gp) | + (gp ; rcu-link ; rcu-fence ; rcu-link ; rcu-rscsi) | + (rcu-rscsi ; rcu-link ; rcu-fence ; rcu-link ; gp) | (rcu-fence ; rcu-link ; rcu-fence) (* rb orders instructions just as pb does *)