[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080207000425.GA21918@elte.hu>
Date: Thu, 7 Feb 2008 01:04:25 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: softlockup: automatically detect hung TASK_UNINTERRUPTIBLE
tasks
* Andrew Morton <akpm@...ux-foundation.org> wrote:
> > Does that kernel have:
> >
> > commit ed50d6cbc394cd0966469d3e249353c9dd1d38b9
> > Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Date: Sat Feb 2 00:23:08 2008 +0100
> >
> > debug: softlockup looping fix
>
> yup. It was fetched less than 24 hours ago.
does the patch below improve the situation?
Ingo
---
arch/x86/kernel/reboot.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
Index: linux-x86.q/arch/x86/kernel/reboot.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/reboot.c
+++ linux-x86.q/arch/x86/kernel/reboot.c
@@ -396,8 +396,20 @@ void machine_shutdown(void)
if (!cpu_isset(reboot_cpu_id, cpu_online_map))
reboot_cpu_id = smp_processor_id();
- /* Make certain I only run on the appropriate processor */
- set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id));
+ /*
+ * Make certain we only run on the appropriate processor,
+ * and with sufficient priority:
+ */
+ {
+ struct sched_param schedparm;
+ schedparm.sched_priority = 99;
+ int ret;
+
+ ret = sched_setscheduler(current, SCHED_RR, &schedparm);
+ WARN_ON_ONCE(1);
+
+ set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id));
+ }
/* O.K Now that I'm on the appropriate processor,
* stop all of the others.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists