Skip to contentSkip to conversation

New 2.5.14 Hotplug CPU Work

PATCH Dipankar Sarma 1 participant 1 message May 6, 2002

Subsystems (4)
lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · In article <[email protected]> Rusty Russell wrote:

Hi all,

After some delay, a new scratch implementation of hotplug CPU
for x86 is available:

[..]

Quoted 5 lines

I'm pretty happy with the simpler boot code, but there are several problems with this version:

1) It needs synchronize_kernel to be 100% correct, which was broken by preempt.

Hi Rusty,

Here is a patch (rcu_poll) that supports synchronize_kernel() in preemptible environment. This is a work in progress, there are issues related to handling very long grace periods gracefully in preemptible kernel that I am working on.

Thanks

Signature · 2 lines
Dipankar Sarma  <[email protected]> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
include/linux/init_task.h +1 -0
diff -urN linux-2.5.12-base/include/linux/init_task.h linux-2.5.12-rcu_poll_preempt/include/linux/init_task.h
@@ -79,6 +79,7 @@
     blocked:		{{0}},						\
     alloc_lock:		SPIN_LOCK_UNLOCKED,				\
     journal_info:	NULL,						\
+    cpu_preempt_cntr:	NULL,					\
 }
 
 
include/linux/rcupdate.h +59 -0

59 lines not on this page · raw message

include/linux/sched.h +51 -0

81 lines not on this page · raw message

init/main.c +2 -0
diff -urN linux-2.5.12-base/init/main.c linux-2.5.12-rcu_poll_preempt/init/main.c
@@ -28,6 +28,7 @@
 #include <linux/bootmem.h>
 #include <linux/tty.h>
 #include <linux/percpu.h>
+#include <linux/rcupdate.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -346,6 +347,7 @@
 	printk("Kernel command line: %s\n", saved_command_line);
 	parse_options(command_line);
 	trap_init();
+	rcu_init();
 	init_IRQ();
 	sched_init();
 	softirq_init();
kernel/Makefile +2 -2
diff -urN linux-2.5.12-base/kernel/Makefile linux-2.5.12-rcu_poll_preempt/kernel/Makefile
@@ -10,12 +10,12 @@
 O_TARGET := kernel.o
 
 export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \
-		printk.o platform.o 
+		printk.o platform.o rcupdate.o
 
 obj-y     = sched.o dma.o fork.o exec_domain.o panic.o printk.o \
 	    module.o exit.o itimer.o info.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
-	    signal.o sys.o kmod.o context.o futex.o platform.o
+	    signal.o sys.o kmod.o context.o futex.o platform.o rcupdate.o
 
 obj-$(CONFIG_UID16) += uid16.o
 obj-$(CONFIG_MODULES) += ksyms.o
kernel/exit.c +1 -0
diff -urN linux-2.5.12-base/kernel/exit.c linux-2.5.12-rcu_poll_preempt/kernel/exit.c
@@ -550,6 +550,7 @@
 
 	tsk->exit_code = code;
 	exit_notify();
+	rcu_preempt_put();
 	schedule();
 	BUG();
 /*
kernel/fork.c +1 -0
diff -urN linux-2.5.12-base/kernel/fork.c linux-2.5.12-rcu_poll_preempt/kernel/fork.c
@@ -117,6 +117,7 @@
 	tsk->thread_info = ti;
 	ti->task = tsk;
 	atomic_set(&tsk->usage,1);
+	tsk->cpu_preempt_cntr = NULL;
 
 	return tsk;
 }
kernel/rcupdate.c +218 -0

218 lines not on this page · raw message

kernel/sched.c +43 -1

93 lines not on this page · raw message