[PATCH] RCU - cpu-offline-cleanup [1/3]

From: Dipankar Sarma
Date: Sat Jul 31 2004 - 03:58:21 EST


Andrew,

There is a series of patches in my tree and these 3 are the first
ones that should probably be merged down the road. Descriptions are on
top of the patches. Please include them in -mm.

A lot of RCU code will be cleaned up later in order to support
call_rcu_bh(), the separate RCU interface that considers softirq
handler completion a quiescent state.

Thanks
Dipankar



Signed-off-by: Dipankar Sarma <dipankar@xxxxxxxxxx>

Minor cleanup of the hotplug code to remove #ifdef in cpu
event notifier handler. If CONFIG_HOTPLUG_CPU is not defined,
CPU_DEAD case will be optimized off.


kernel/rcupdate.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff -puN kernel/rcupdate.c~cpu-offline-cleanup kernel/rcupdate.c
--- linux-2.6.8-rc2-rcu/kernel/rcupdate.c~cpu-offline-cleanup 2004-07-29 13:35:18.000000000 +0530
+++ linux-2.6.8-rc2-rcu-dipankar/kernel/rcupdate.c 2004-07-29 13:41:18.000000000 +0530
@@ -242,6 +242,12 @@ unlock:
tasklet_kill_immediate(&RCU_tasklet(cpu), cpu);
}

+#else
+
+static void rcu_offline_cpu(int cpu)
+{
+}
+
#endif

void rcu_restart_cpu(int cpu)
@@ -325,11 +331,9 @@ static int __devinit rcu_cpu_notify(stru
case CPU_UP_PREPARE:
rcu_online_cpu(cpu);
break;
-#ifdef CONFIG_HOTPLUG_CPU
case CPU_DEAD:
rcu_offline_cpu(cpu);
break;
-#endif
default:
break;
}

_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/