All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/3] tracepoints: Do not use call_rcu_sched() before early_initcall()
Date: Sun, 14 Dec 2014 10:13:00 -0800	[thread overview]
Message-ID: <20141214181300.GD5310@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141214124431.48689d64@gandalf.local.home>

On Sun, Dec 14, 2014 at 12:44:31PM -0500, Steven Rostedt wrote:
> On Sun, 14 Dec 2014 17:29:28 +0000 (UTC)
> Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
> 
> > Given that your reason for having this RCU-specific logic in tracepoint.c
> > rather than within call_rcu*() is not slowing down a fast-path, how about
> > creating a new call_rcu_early() and call_rcu_sched_early() which can be
> > called in normal operation and at early boot ?
> 
> That's a possibility.
> 
> > 
> > This would allow us to keep the RCU logic within the RCU implementation
> > rather than strongly coupling it with the tracepoint code.
> > 
> 
> It's not that strong of a coupling to RCU. It's more coupled to being
> called really early (which needs special care).
> 
> It just happened that RCU failed for being called that early. Other
> things could possible fail too (if added to the tracepoint logic).
> Maybe I should rename the variable to "tracepoint_earlyboot" instead.

But you do have to call this quite early.  After rcu_init() is invoked,
things should work fine.

> But as RCU is the only thing that failed (so far in my testing), I'll
> think about adding a call_rcu_sched_early(). But then, this does make
> things more complex, and me more nervous about adding it.

I really am nervous about a call_rcu_sched_early() that immediately
invokes the specified callback.  That is just begging for someone to
invoke it while traversing a list in an RCU read-side critical section,
which will break.

My thought is to make the compiler initialize the pieces of RCU that
are needed.  That said, this initialization includes per-CPU variables,
so the question then becomes "when do per-CPU variables get initialized?"

							Thanx, Paul


  reply	other threads:[~2014-12-14 18:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-14 16:41 [PATCH 0/3] tracing: Enable tracepoints early and allow printk to use them Steven Rostedt
2014-12-14 16:41 ` [PATCH 1/3] tracepoints: Do not use call_rcu_sched() before early_initcall() Steven Rostedt
2014-12-14 16:53   ` Steven Rostedt
2014-12-14 18:08     ` Paul E. McKenney
2014-12-14 18:15       ` Steven Rostedt
2014-12-14 18:18         ` Paul E. McKenney
2014-12-14 18:25           ` Steven Rostedt
2014-12-14 20:23             ` Paul E. McKenney
2014-12-14 17:05   ` Mathieu Desnoyers
2014-12-14 17:14     ` Steven Rostedt
2014-12-14 17:21       ` Steven Rostedt
2014-12-14 17:29         ` Mathieu Desnoyers
2014-12-14 17:44           ` Steven Rostedt
2014-12-14 18:13             ` Paul E. McKenney [this message]
2014-12-14 16:41 ` [PATCH 2/3] tracing: Move enabling tracepoints to just after mm_init() Steven Rostedt
2014-12-14 18:14   ` Paul E. McKenney
2014-12-14 18:20     ` Steven Rostedt
2014-12-14 20:26       ` Paul E. McKenney
2014-12-14 16:41 ` [PATCH 3/3] tracing: Add tp_printk cmdline to have tracepoints go to printk() Steven Rostedt
2014-12-14 17:07 ` [PATCH 0/3] tracing: Enable tracepoints early and allow printk to use them Steven Rostedt

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=20141214181300.GD5310@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.