From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbdFNUXh (ORCPT ); Wed, 14 Jun 2017 16:23:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44731 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751664AbdFNUXg (ORCPT ); Wed, 14 Jun 2017 16:23:36 -0400 Date: Wed, 14 Jun 2017 13:23:29 -0700 From: "Paul E. McKenney" To: Andrea Parri Cc: linux-kernel@vger.kernel.org, priyalee.kushwaha@intel.com, drozdziak1@gmail.com, arnd@arndb.de, ldr709@gmail.com, tglx@linutronix.de, peterz@infradead.org, josh@joshtriplett.org, nico@linaro.org, kjlx@templeofstupid.com, vegard.nossum@oracle.com, torvalds@linux-foundation.org, dcb314@hotmail.com, fengguang.wu@intel.com, fweisbec@gmail.com, riel@redhat.com, rostedt@goodmis.org, mingo@kernel.org, stern@rowland.harvard.edu Subject: Re: [GIT PULL rcu/next] RCU commits for 4.13 Reply-To: paulmck@linux.vnet.ibm.com References: <20170612213754.GA7201@linux.vnet.ibm.com> <20170614025404.GA2525@andrea> <20170614043317.GK3721@linux.vnet.ibm.com> <20170614143322.GA3368@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170614143322.GA3368@andrea> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17061420-0040-0000-0000-0000036221AC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007232; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000212; SDB=6.00874800; UDB=6.00435489; IPR=6.00654891; BA=6.00005421; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015827; XFM=3.00000015; UTC=2017-06-14 20:23:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061420-0041-0000-0000-000007563263 Message-Id: <20170614202329.GV3721@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-14_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706140339 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 14, 2017 at 04:33:22PM +0200, Andrea Parri wrote: > On Tue, Jun 13, 2017 at 09:33:17PM -0700, Paul E. McKenney wrote: > > On Wed, Jun 14, 2017 at 04:54:04AM +0200, Andrea Parri wrote: > > > On Mon, Jun 12, 2017 at 02:37:55PM -0700, Paul E. McKenney wrote: > > > > Hello, Ingo, > > > > > > > > This pull request is unusual in being a single linear set of commits, > > > > as opposed to my usual topic branches. This is due to the many > > > > large-footprint changes, which means that reasonable topic branches > > > > result in large numbers of merge conflicts. In addition, some commits > > > > depend on other commits that should be on different topic branches. > > > > I will return to the topic-branch style next time. > > > > > > > > The largest feature of this series is shrinking and simplification, > > > > with the following diffstat summary: > > > > > > > > 79 files changed, 1496 insertions(+), 4211 deletions(-) > > > > > > > > In other words, this series represents a net reduction of more than 2700 > > > > lines of code. > > > > > > > > These commits were posted to LKML: > > > > > > > > http://lkml.kernel.org/r/20170525215934.GA11578@linux.vnet.ibm.com > > > > > > I did raise some issues (AFAICT, unresolved) concerning... > > > > > > > > > > > > > > Two of these commits (46/88 and 48/88) have been deferred, most likely > > > > to v4.14. All of the remaining commits have been subjected to the 0day > > > > Test Robot and -next testing, and are availiable in teh git repository at: > > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git for-mingo > > > > > > > > for you to fetch changes up to 6d48152eafde1f0d0a4a9e0584fa7d9ff4fbfdac: > > > > > > > > rcu: Remove RCU CPU stall warnings from Tiny RCU (2017-06-08 18:52:45 -0700) > > > > > > > > ---------------------------------------------------------------- > > > > Arnd Bergmann (1): > > > > bcm47xx: Fix build regression > > > > > > > > Paul E. McKenney (83): > > > > rcutorture: Add lockdep to one of the SRCU scenarios > > > > rcutorture: Add three-level tree test for Tree SRCU > > > > rcutorture: Fix bug in reporting Kconfig mis-settings > > > > rcutorture: Add a scenario for Tiny SRCU > > > > rcutorture: Add a scenario for Classic SRCU > > > > rcu: Prevent rcu_barrier() from starting needless grace periods > > > > rcutorture: Correctly handle CONFIG_RCU_TORTURE_TEST_* options > > > > rcutorture: Update test scenarios based on new Kconfig dependencies > > > > srcu: Eliminate possibility of destructive counter overflow > > > > rcu: Complain if blocking in preemptible RCU read-side critical section > > > > rcuperf: Defer expedited/normal check to end of test > > > > rcuperf: Remove conflicting Kconfig options > > > > rcu: Remove obsolete reference to synchronize_kernel() > > > > rcuperf: Add ability to performance-test call_rcu() and friends > > > > rcuperf: Add a Kconfig-fragment file for Classic SRCU > > > > rcu: Make sync_rcu_preempt_exp_done() return bool > > > > checkpatch: Remove checks for expedited grace periods > > > > rcuperf: Add test for dynamically initialized srcu_struct > > > > doc/atomic_ops: Clarify smp_mb__{before,after}_atomic() > > > > atomics: Add header comment so spin_unlock_wait() > > > > > > ... this one: c.f., > > > > > > http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1418503.html > > > > > > Any hints about those? > > > > I suggest being -extremely- clear. This is about ARM, correct? > > If so, lay out the exact situation (code example, which hardware, > > which spin_unlock_wait(), which sequence of events) that could lead to > > the failure. > > > > The problem here is that no one knows which of the 30 CPU families you > > might be talking about, nor do they know exactly what the problem is. > > I didn't worry about it at the time because I figured that you had > > sent private email to Will with the full story. > > > > Yes, the four of us (you, Alan, Luc, and me) discussed it, but we weren't > > sure whether it was a bug in the memory model, the spin_unlock_wait() > > code, or my description of spin_unlock_wait(). Given that Will didn't > > object to my April 13th email (the one that you were not CCed on), > > I figured that he wasn't going to claim that the spin_unlock_wait() > > description was wrong, especially since he went to so much effort some > > years back to make ARM64 meet that description. > > > > So again, I recommend replying to your msg1418503.html email with > > a code fragment demonstrating the problem, exact identification of > > the hardware that might be susceptible (ARM64? ARM32? Which ARM32?), > > exact identification of which spin_unlock_wait() function you suspect, > > and a clear bullet-form sequence of events that shows how you believe > > that the problem can occur. > > > > That makes it easy for people to see what your concern is, easy for > > them to check their code and hardware, and hard for them to ignore you. > > > > Make sense? > > My concerns originates from the fact that none of the implementations > (of spin_unlock_wait()) for the architectures touched by: > > 726328d92a42b6d4b76078e2659f43067f82c4e8 > ("locking/spinlock, arch: Update and fix spin_unlock_wait() implementations" > > currently contain any traces of that RELEASE/spin_unlock() from your: > > "Semantically this is equivalent to a spin_lock() immediately followed > by a spin_unlock()." > > In fact, the header of that commit states: > > "The update is in semantics; where it previously was only a control > dependency, we now upgrade to a full load-acquire [...]" > > For an example leveraging this RELEASE, consider: > > [initially: X = 0, s UNLOCKED] > > P0 P1 > X = 1; spin_lock(s); > spin_unlock_wait(s); r0 = X; > > According to the "spin_lock(); spin_unlock() semantics" this has one > non-deadlocking execution, and the RELEASE from the spin_unlock_wait() > (paired with the ACQUIRE from the spin_lock() in P1) guarantees that > r0 = 1 in this execution. AFAICT, this same conclusion does not hold > according to the "smp_cond_load_acquire() semantics" (726328d92a42b). OK. For exactly which CPU families do you believe that this fails to hold. That is, given the implementations of spin_unlock_wait() and spin_lock() for the various CPU families, which will break and why? Thanx, Paul