All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH tip/core/rcu 0/6] Check for use of RCU from dyntick-idle mode
@ 2011-07-08 15:43 Paul E. McKenney
  2011-07-08 15:43 ` [PATCH RFC tip/core/rcu 1/6] rcu: Detect illegal rcu dereference in extended quiescent state Paul E. McKenney
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Paul E. McKenney @ 2011-07-08 15:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, niv, tglx,
	peterz, rostedt, Valdis.Kletnieks, dhowells, eric.dumazet,
	darren, patches

Hello!

This set of patches adds checks for use of RCU from "extended quiescent
states" such as dyntick-idle mode.  Such use is grossly illegal because
RCU by definition ignores CPUs that are in extended quiescent states.
In the case of dyntick-idle mode, the only way for RCU to avoid ignoring
such CPUs would be to wake them up periodically, which would defeat the
whole purpose of dyntick-idle mode.

The good news is that Frederic got this effort started.  The bad news is
that there are several cases where RCU read-side critical sections appear
in dyntick-idle mode.  Frederic is working on a solution, but because there
is no point in giving warnings in cases where there is no known fix, I will
not push these patches until a fix is available.  (The most likely fix is
to move the code that informs RCU of entry to and exit from dyntick-idle
mode into the arch-specific idle loops, which would legitimize current RCU
usage -- and potentially simplify RCU's quiescent-state detection.)

The individual patches are as follows:

1.	Make rcu_read_lock_held(), rcu_read_lock_sched_held(),
	and rcu_read_lock_bh_held() invoke a new rcu_check_extended_qs()
	function to check for calls from extended quiescent states,
	courtesy of Frederic Weisbecker.
2.	Make lockdep RCU splats call out use from within extended
	quiescent states, also courtesy of Frederic Weisbecker.
3.	Make rcu_read_lock(), rcu_read_lock_sched(), and
	rcu_read_lock_bh() also check for (illegal) use from within
	an extended quiescent state, again courtesy of Frederic
	Weisbecker.
4.	Remove an unnecessary level of abstraction from the PROVE_RCU
	checking.
5.	Warn when srcu_read_lock() and srcu_read_lock_held() are called
	from within an extended quiescent state.
6.	Make srcu_read_lock_held() invoke the debug_lockdep_rcu_enabled()
	common function that determines whether or not RCU lockdep splats
	are appropriate.

These changes are also available on the subject-to-rebase branch in the
git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu.git eqscheck.2011.07.08a

							Thanx, Paul

------------------------------------------------------------------------

 b/include/linux/rcupdate.h |   36 +++++++++++++++
 b/include/linux/srcu.h     |   25 ++++++----
 b/kernel/lockdep.c         |   20 ++++++++
 b/kernel/rcupdate.c        |   17 ++++++-
 b/kernel/rcutiny.c         |   14 ++++++
 b/kernel/rcutree.c         |   16 ++++++
 include/linux/rcupdate.h   |  105 +++++++++++++++++++++------------------------
 include/linux/srcu.h       |    5 +-
 8 files changed, 171 insertions(+), 67 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-07-11 18:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08 15:43 [PATCH tip/core/rcu 0/6] Check for use of RCU from dyntick-idle mode Paul E. McKenney
2011-07-08 15:43 ` [PATCH RFC tip/core/rcu 1/6] rcu: Detect illegal rcu dereference in extended quiescent state Paul E. McKenney
2011-07-08 15:43 ` [PATCH RFC tip/core/rcu 2/6] rcu: Inform the user about dynticks-idle mode on PROVE_RCU warning Paul E. McKenney
2011-07-08 15:43 ` [PATCH RFC tip/core/rcu 3/6] rcu: Warn when rcu_read_lock() is used in extended quiescent state Paul E. McKenney
2011-07-08 15:43 ` [PATCH RFC tip/core/rcu 4/6] rcu: Remove one layer of abstraction from PROVE_RCU checking Paul E. McKenney
2011-07-08 15:43 ` [PATCH RFC tip/core/rcu 5/6] rcu: Warn when srcu_read_lock() is used in an extended quiescent state Paul E. McKenney
2011-07-08 15:43 ` [PATCH RFC tip/core/rcu 6/6] rcu: Make srcu_read_lock_held() call common lockdep-enabled function Paul E. McKenney
2011-07-11 16:03 ` [PATCH tip/core/rcu 0/6] Check for use of RCU from dyntick-idle mode Frederic Weisbecker
2011-07-11 16:38   ` Paul E. McKenney
2011-07-11 16:44     ` Frederic Weisbecker
2011-07-11 17:00       ` Paul E. McKenney
2011-07-11 18:10         ` Frederic Weisbecker

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.