mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	"Joel Fernandes, Google" <joel@joelfernandes.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Ingo Molnar <mingo@redhat.com>,
	Richard Fontana <rfontana@redhat.com>,
	rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Josh Triplett <josh@joshtriplett.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Subject: Re: [RFC 0/3] Revert SRCU from tracepoint infrastructure
Date: Mon, 10 Feb 2020 05:57:10 -0800	[thread overview]
Message-ID: <20200210135710.GX2935@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200210134432.GK14897@hirez.programming.kicks-ass.net>

On Mon, Feb 10, 2020 at 02:44:32PM +0100, Peter Zijlstra wrote:
> On Mon, Feb 10, 2020 at 05:36:52AM -0800, Paul E. McKenney wrote:
> 
> > > Furthermore, using srcu would be detrimental, because of how it has
> > > smp_mb() in the read side primitives.
> > 
> > Note that rcu_irq_enter() and rcu_irq_exit() also contain value-returning
> > atomics, which imply full memory barriers.
> 
> There is a whole lot of perf that doesn't go through tracepoints. It
> makes absolutely no sense to make all that more expensive just because
> tracepoints are getting 'funny'.

OK.

> > > The best we can do is move that rcu_irq_enter/exit_*() crud into the
> > > perf tracepoint glue I suppose.
> > 
> > One approach would be to define a synchronize_preempt_disable() that
> > waits only for pre-existing disabled-preemption regions (including
> > of course diabled-irq and NMI-handler regions.  Something like Steve
> > Rostedt's workqueue-baed schedule_on_each_cpu(ftrace_sync) implementation
> > might work.
> > 
> > There are of course some plusses and minuses:
> > 
> > +	Works on preempt-disable regions in idle-loop code without
> > 	the need to invoke rcu_idle_exit() and rcu_idle_enter()..
> > 
> > +	Straightforward implementation.
> > 
> > -	Does not work on preempt-disable regions on offline CPUs.
> > 	(I have no idea if this really matters.)
> 
> I'd hope not ;-)

Me too, but I have harbored a great many hopes over the decades.  ;-)

> > -	Schedules on idle CPUs, so usage needs to be restricted to
> > 	avoid messing up energy-efficient systems.  (It should be
> > 	just fine to use this for tracing.)
> 
> Unless you're tracing energy usage -- weird some people actually do that
> :-)

Would they be changing tracing of their energy usage often in production?

							Thanx, Paul

  reply	other threads:[~2020-02-10 13:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 20:56 Joel Fernandes (Google)
2020-02-07 20:56 ` [RFC 1/3] Revert "tracepoint: Use __idx instead of idx in DO_TRACE macro to make it unique" Joel Fernandes (Google)
2020-02-07 21:07   ` Steven Rostedt
2020-02-07 20:56 ` [RFC 2/3] Revert "tracing: Add back in rcu_irq_enter/exit_irqson() for rcuidle tracepoints" Joel Fernandes (Google)
2020-02-07 20:56 ` [RFC 3/3] Revert "tracepoint: Make rcuidle tracepoint callers use SRCU" Joel Fernandes (Google)
2020-02-07 21:24 ` [RFC 0/3] Revert SRCU from tracepoint infrastructure Paul E. McKenney
2020-02-07 21:43   ` Joel Fernandes
2020-02-08 16:39     ` Mathieu Desnoyers
2020-02-08 16:31 ` Mathieu Desnoyers
2020-02-10  9:46   ` Peter Zijlstra
2020-02-10 10:19     ` Peter Zijlstra
2020-02-10 13:36     ` Paul E. McKenney
2020-02-10 13:44       ` Peter Zijlstra
2020-02-10 13:57         ` Paul E. McKenney [this message]
2020-02-10 17:17       ` Joel Fernandes
2020-02-10 17:05     ` Steven Rostedt
2020-02-10 17:33       ` Mathieu Desnoyers
2020-02-10 18:30         ` Steven Rostedt
2020-02-10 19:05           ` Mathieu Desnoyers
2020-02-10 19:53           ` Joel Fernandes
2020-02-10 20:03             ` Steven Rostedt
2020-02-10 20:30               ` Joel Fernandes
2020-02-10 18:07       ` Paul E. McKenney
2020-02-10 16:59   ` Joel Fernandes

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=20200210135710.GX2935@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=arnaldo.melo@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rfontana@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

all inboxes | Powered by JetHome®