Re: [PATCH 2/2] Hotplug CPU vs TASK_ZOMBIEs: The Sequel to HotplugCPU vs TASK_DEAD

From: Rusty Russell
Date: Thu Aug 26 2004 - 21:09:58 EST


On Fri, 2004-08-27 at 01:29, Nathan Lynch wrote:
> On Thu, 2004-08-26 at 02:58, Rusty Russell wrote:
> > Name: Hotplug CPU vs TASK_ZOMBIEs: The Sequel to Hotplug CPU vs TASK_DEAD
> > Status: Tested on 2.6.8.1-mm4
> > Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> > Depends: Misc/stop_machine-nicksched-yield.patch.gz
>
> Where can I get stop_machine-nicksched-yield.patch? I assume this fixes
> the interaction between nicksched and stop_machine_run?

I posted it before: it's a one-liner. Again, below.

Cheers,
Rusty.
Name: Fix stop_machine() For Nick Sched
Status: Tested on 2.6.8.1-mm4
Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Version: -mm

With Nick's scheduler, yield() on a RT task does nothing unless it's
SCHED_RR. But __stop_machine_run() yields for migration threads to
move the kstopmachine threads onto the other CPUs. Change it from
SCHED_FIFO to SCHED_RR, and it yields correctly.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .13565-linux-2.6.8.1-mm4/kernel/stop_machine.c .13565-linux-2.6.8.1-mm4.updated/kernel/stop_machine.c
--- .13565-linux-2.6.8.1-mm4/kernel/stop_machine.c 2004-05-10 15:13:59.000000000 +1000
+++ .13565-linux-2.6.8.1-mm4.updated/kernel/stop_machine.c 2004-08-26 16:24:56.000000000 +1000
@@ -82,7 +86,7 @@ static int stop_machine(void)
int i, ret = 0;
struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };

/* One high-prio thread per cpu. We'll do this one. */
- sys_sched_setscheduler(current->pid, SCHED_FIFO, &param);
+ sys_sched_setscheduler(current->pid, SCHED_RR, &param);

atomic_set(&stopmachine_thread_ack, 0);

--
Anyone who quotes me in their signature is an idiot -- Rusty Russell

-
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/