diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2009-06-25 12:08:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-03 04:02:28 -0400 |
commit | 03b042bf1dc14a268a3d65d38b4ec2a4261e8477 (patch) | |
tree | 10e422a1396087d14cec164d8f4962d7ce8bcf2d /include/linux/rcupreempt.h | |
parent | c17ef45342cc033fdf7bdd5b28615e0090f8d2e7 (diff) |
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>
Diffstat (limited to 'include/linux/rcupreempt.h')
-rw-r--r-- | include/linux/rcupreempt.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h index fce522782ffa..f164ac9b7807 100644 --- a/include/linux/rcupreempt.h +++ b/include/linux/rcupreempt.h | |||
@@ -74,6 +74,16 @@ extern int rcu_needs_cpu(int cpu); | |||
74 | 74 | ||
75 | extern void __synchronize_sched(void); | 75 | extern void __synchronize_sched(void); |
76 | 76 | ||
77 | static inline void synchronize_rcu_expedited(void) | ||
78 | { | ||
79 | synchronize_rcu(); /* Placeholder for new rcupreempt implementation. */ | ||
80 | } | ||
81 | |||
82 | static inline void synchronize_rcu_bh_expedited(void) | ||
83 | { | ||
84 | synchronize_rcu_bh(); /* Placeholder for new rcupreempt impl. */ | ||
85 | } | ||
86 | |||
77 | extern void __rcu_init(void); | 87 | extern void __rcu_init(void); |
78 | extern void rcu_init_sched(void); | 88 | extern void rcu_init_sched(void); |
79 | extern void rcu_check_callbacks(int cpu, int user); | 89 | extern void rcu_check_callbacks(int cpu, int user); |