Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Heiko Carstens
Date: Wednesday, September 22, 2010 - 1:37 am

On Tue, Sep 21, 2010 at 05:40:18PM +0200, Peter Zijlstra wrote:

Something like this?

diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 4372ccb..854fd57 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -291,7 +291,6 @@ repeat:
 static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
 					   unsigned long action, void *hcpu)
 {
-	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
 	unsigned int cpu = (unsigned long)hcpu;
 	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
 	struct task_struct *p;
@@ -304,7 +303,6 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
 				   cpu);
 		if (IS_ERR(p))
 			return NOTIFY_BAD;
-		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
 		get_task_struct(p);
 		stopper->thread = p;
 		break;

...gets stuck nearly immediatly on cpu hotplug stress if the machine is
doing anything but idling around.
I was too lazy to figure out why it got stuck. I'm afraid that with such
a change a new class of bugs will appear.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH/RFC] timer: fix deadlock on cpu hotplug, Heiko Carstens, (Tue Sep 21, 7:20 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Tejun Heo, (Tue Sep 21, 8:36 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Thomas Gleixner, (Tue Sep 21, 8:39 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Peter Zijlstra, (Tue Sep 21, 8:40 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Heiko Carstens, (Wed Sep 22, 1:37 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Peter Zijlstra, (Wed Sep 22, 2:22 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Peter Zijlstra, (Wed Sep 22, 7:29 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Heiko Carstens, (Thu Sep 23, 6:31 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Peter Zijlstra, (Fri Sep 24, 5:19 pm)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Peter Zijlstra, (Mon Oct 11, 5:31 am)
Re: [PATCH/RFC] timer: fix deadlock on cpu hotplug, Heiko Carstens, (Mon Oct 11, 6:51 am)
[tip:sched/core] sched: Create special class for stop/migr ..., tip-bot for Peter Zi ..., (Mon Oct 18, 12:16 pm)