rcu: Add synchronize_sched_expedited() primitive
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 25 Jun 2009 16:08:16 +0000 (09:08 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 3 Jul 2009 08:02:28 +0000 (10:02 +0200)
commit03b042bf1dc14a268a3d65d38b4ec2a4261e8477
tree10e422a1396087d14cec164d8f4962d7ce8bcf2d
parentc17ef45342cc033fdf7bdd5b28615e0090f8d2e7
rcu: Add synchronize_sched_expedited() primitive

This adds the synchronize_sched_expedited() primitive that
implements the "big hammer" expedited RCU grace periods.

This primitive is placed in kernel/sched.c rather than
kernel/rcupdate.c due to its need to interact closely with the
migration_thread() kthread.

The idea is to wake up this kthread with req->task set to NULL,
in response to which the kthread reports the quiescent state
resulting from the kthread having been scheduled.

Because this patch needs to fallback to the slow versions of
the primitives in response to some races with CPU onlining and
offlining, a new synchronize_rcu_bh() primitive is added as
well.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: akpm@linux-foundation.org
Cc: torvalds@linux-foundation.org
Cc: davem@davemloft.net
Cc: dada1@cosmosbay.com
Cc: zbr@ioremap.net
Cc: jeff.chua.linux@gmail.com
Cc: paulus@samba.org
Cc: laijs@cn.fujitsu.com
Cc: jengelh@medozas.de
Cc: r000n@r000n.net
Cc: benh@kernel.crashing.org
Cc: mathieu.desnoyers@polymtl.ca
LKML-Reference: <12459460982947-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/rcupdate.h
include/linux/rcupreempt.h
include/linux/rcutree.h
kernel/rcupdate.c
kernel/sched.c