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/rcupdate.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/rcupdate.h')
-rw-r--r-- | include/linux/rcupdate.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 0cdfdb622faa..3c89d6a2591f 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -51,7 +51,19 @@ struct rcu_head { | |||
51 | void (*func)(struct rcu_head *head); | 51 | void (*func)(struct rcu_head *head); |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* Internal to kernel, but needed by rcupreempt.h. */ | 54 | /* Exported common interfaces */ |
55 | extern void synchronize_rcu(void); | ||
56 | extern void synchronize_rcu_bh(void); | ||
57 | extern void rcu_barrier(void); | ||
58 | extern void rcu_barrier_bh(void); | ||
59 | extern void rcu_barrier_sched(void); | ||
60 | extern void synchronize_sched_expedited(void); | ||
61 | extern int sched_expedited_torture_stats(char *page); | ||
62 | |||
63 | /* Internal to kernel */ | ||
64 | extern void rcu_init(void); | ||
65 | extern void rcu_scheduler_starting(void); | ||
66 | extern int rcu_needs_cpu(int cpu); | ||
55 | extern int rcu_scheduler_active; | 67 | extern int rcu_scheduler_active; |
56 | 68 | ||
57 | #if defined(CONFIG_TREE_RCU) | 69 | #if defined(CONFIG_TREE_RCU) |
@@ -257,15 +269,4 @@ extern void call_rcu(struct rcu_head *head, | |||
257 | extern void call_rcu_bh(struct rcu_head *head, | 269 | extern void call_rcu_bh(struct rcu_head *head, |
258 | void (*func)(struct rcu_head *head)); | 270 | void (*func)(struct rcu_head *head)); |
259 | 271 | ||
260 | /* Exported common interfaces */ | ||
261 | extern void synchronize_rcu(void); | ||
262 | extern void rcu_barrier(void); | ||
263 | extern void rcu_barrier_bh(void); | ||
264 | extern void rcu_barrier_sched(void); | ||
265 | |||
266 | /* Internal to kernel */ | ||
267 | extern void rcu_init(void); | ||
268 | extern void rcu_scheduler_starting(void); | ||
269 | extern int rcu_needs_cpu(int cpu); | ||
270 | |||
271 | #endif /* __LINUX_RCUPDATE_H */ | 272 | #endif /* __LINUX_RCUPDATE_H */ |