diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2009-08-15 09:53:48 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-15 19:02:08 +0200 |
commit | 2e597558086dec36d5c33521a36e0f6b1bc3f3a7 (patch) | |
tree | ce8c6ced1c8a3b6bf6170a5894e1d7102e6ee9d4 /kernel/rcupreempt.c | |
parent | 799e64f05f4bfaad2bb3165cab95c8c992a1c296 (diff) | |
download | op-kernel-dev-2e597558086dec36d5c33521a36e0f6b1bc3f3a7.zip op-kernel-dev-2e597558086dec36d5c33521a36e0f6b1bc3f3a7.tar.gz |
rcu: Simplify RCU CPU-hotplug notification
Use the new cpu_notifier() API to simplify RCU's CPU-hotplug
notifiers, collapsing down to a single such notifier.
This makes it trivial to provide the notifier-ordering
guarantee that rcu_barrier() depends on.
Also remove redundant open_softirq() calls from Hierarchical
RCU notifier.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: josht@linux.vnet.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: hugh.dickins@tiscali.co.uk
Cc: benh@kernel.crashing.org
LKML-Reference: <12503552312510-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/rcupreempt.c')
-rw-r--r-- | kernel/rcupreempt.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index beb0e65..9b87f51 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c @@ -1417,8 +1417,8 @@ int rcu_pending(int cpu) return 0; } -static int __cpuinit rcu_cpu_notify(struct notifier_block *self, - unsigned long action, void *hcpu) +int __cpuinit rcu_cpu_notify(struct notifier_block *self, + unsigned long action, void *hcpu) { long cpu = (long)hcpu; @@ -1439,10 +1439,6 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata rcu_nb = { - .notifier_call = rcu_cpu_notify, -}; - void __init __rcu_init(void) { int cpu; @@ -1471,23 +1467,6 @@ void __init __rcu_init(void) rdp->waitschedtail = &rdp->waitschedlist; rdp->rcu_sched_sleeping = 0; } - register_cpu_notifier(&rcu_nb); - - /* - * We don't need protection against CPU-Hotplug here - * since - * a) If a CPU comes online while we are iterating over the - * cpu_online_mask below, we would only end up making a - * duplicate call to rcu_online_cpu() which sets the corresponding - * CPU's mask in the rcu_cpu_online_map. - * - * b) A CPU cannot go offline at this point in time since the user - * does not have access to the sysfs interface, nor do we - * suspend the system. - */ - for_each_online_cpu(cpu) - rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE, (void *)(long) cpu); - open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); } |