public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Andrea Parri <parri.andrea@gmail•com>
To: Peter Zijlstra <peterz@infradead•org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios•com>,
	"Paul E. McKenney" <paulmck@linux•vnet.ibm.com>,
	linux-kernel <linux-kernel@vger•kernel.org>,
	Ingo Molnar <mingo@kernel•org>,
	Lai Jiangshan <jiangshanlai@gmail•com>,
	dipankar <dipankar@in•ibm.com>,
	Andrew Morton <akpm@linux-foundation•org>,
	Josh Triplett <josh@joshtriplett•org>,
	Thomas Gleixner <tglx@linutronix•de>,
	rostedt <rostedt@goodmis•org>,
	David Howells <dhowells@redhat•com>,
	Eric Dumazet <edumazet@google•com>, fweisbec <fweisbec@gmail•com>,
	Oleg Nesterov <oleg@redhat•com>,
	Boqun Feng <boqun.feng@gmail•com>, Andrew Hunter <ahh@google•com>,
	maged michael <maged.michael@gmail•com>,
	gromer <gromer@google•com>, Avi Kivity <avi@scylladb•com>,
	Benjamin Herrenschmidt <benh@kernel•crashing.org>,
	Paul Mackerras <paulus@samba•org>,
	Michael Ellerman <mpe@ellerman•id.au>,
	Dave Watson <davejwatson@fb•com>,
	Alan Stern <stern@rowland•harvard.edu>,
	Will Deacon <will.deacon@arm•com>,
	Andy Lutomirski <luto@kernel•org>, Ingo Molnar <mingo@redhat•com>,
	Alexander Viro <viro@zeniv•linux.org.uk>,
	Nicholas Piggin <npiggin@gmail•com>,
	linuxppc-dev <linuxppc-dev@lists•ozlabs.org>,
	linux-arch <linux-arch@vger•kernel.org>
Subject: Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command
Date: Sat, 7 Oct 2017 17:10:04 +0200	[thread overview]
Message-ID: <20171007151004.GA3874@andrea> (raw)
In-Reply-To: <20171006083219.asdpl5w4pl6hedcd@hirez.programming.kicks-ass.net>

On Fri, Oct 06, 2017 at 10:32:19AM +0200, Peter Zijlstra wrote:
> > AFAIU the scheduler rq->lock is held while preemption is disabled.
> > synchronize_sched() is used here to ensure that all pre-existing
> > preempt-off critical sections have completed.
> > 
> > So saying that we use synchronize_sched() to synchronize with rq->lock
> > would be stretching the truth a bit. It's actually only true because the
> > scheduler holding the rq->lock is surrounded by a preempt-off
> > critical section.
> 
> No, rq->lock is sufficient, note that rq->lock is a raw_spinlock_t which
> implies !preempt. Yes, we also surround the rq->lock usage with a
> slightly larger preempt_disable() section but that's not in fact
> required for this.

That's what it is, according to the current sources: we seemed to agree that
a preempt-off critical section is what we rely on here and that the start of
this critical section is not marked by that raw_spin_lock.

  Andrea

      reply	other threads:[~2017-10-07 15:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171004213734.GA11463@linux.vnet.ibm.com>
2017-10-04 21:37 ` [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command Paul E. McKenney
2017-10-05  4:23   ` Nicholas Piggin
2017-10-05 12:22     ` Avi Kivity
2017-10-05 15:54       ` Mathieu Desnoyers
2017-10-05 15:53     ` Mathieu Desnoyers
2017-10-05 12:12   ` Peter Zijlstra
2017-10-05 12:24     ` Peter Zijlstra
2017-10-05 16:05       ` Mathieu Desnoyers
2017-10-05 16:02     ` Mathieu Desnoyers
2017-10-05 16:21       ` Peter Zijlstra
2017-10-05 21:44         ` Mathieu Desnoyers
2017-10-05 22:02       ` Andrea Parri
2017-10-05 22:04         ` Andrea Parri
2017-10-05 22:19         ` Mathieu Desnoyers
2017-10-05 22:46           ` Steven Rostedt
2017-10-06  8:32           ` Peter Zijlstra
2017-10-07 15:10             ` Andrea Parri [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171007151004.GA3874@andrea \
    --to=parri.andrea@gmail$(echo .)com \
    --cc=ahh@google$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=avi@scylladb$(echo .)com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=boqun.feng@gmail$(echo .)com \
    --cc=davejwatson@fb$(echo .)com \
    --cc=dhowells@redhat$(echo .)com \
    --cc=dipankar@in$(echo .)ibm.com \
    --cc=edumazet@google$(echo .)com \
    --cc=fweisbec@gmail$(echo .)com \
    --cc=gromer@google$(echo .)com \
    --cc=jiangshanlai@gmail$(echo .)com \
    --cc=josh@joshtriplett$(echo .)org \
    --cc=linux-arch@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=luto@kernel$(echo .)org \
    --cc=maged.michael@gmail$(echo .)com \
    --cc=mathieu.desnoyers@efficios$(echo .)com \
    --cc=mingo@kernel$(echo .)org \
    --cc=mingo@redhat$(echo .)com \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=npiggin@gmail$(echo .)com \
    --cc=oleg@redhat$(echo .)com \
    --cc=paulmck@linux$(echo .)vnet.ibm.com \
    --cc=paulus@samba$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    --cc=rostedt@goodmis$(echo .)org \
    --cc=stern@rowland$(echo .)harvard.edu \
    --cc=tglx@linutronix$(echo .)de \
    --cc=viro@zeniv$(echo .)linux.org.uk \
    --cc=will.deacon@arm$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox