public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Greg KH <gregkh@suse.de>, Frans Pop <elendil@planet.nl>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [2.6.25-rc1] System no longer powers off after shutdown
Date: Fri, 15 Feb 2008 00:48:32 +0100	[thread overview]
Message-ID: <20080214234832.GA14363@elte.hu> (raw)
In-Reply-To: <86802c440802141538m44d64b6as827426174874979d@mail.gmail.com>


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> after disable cpufreq, i got
> 
> ACPI: Preparing to enter system sleep state S5
> Disabling non-boot CPUs ...
> kvm: disabling virtualization on CPU1
> CPU 1 is now offline
> CPU1 is down
> kvm: disabling virtualization on CPU2
> CPU 2 is now offline
> ================> hang here.
> 
> but x86.git/mm could go through down all the cpus....
> 
> interesting...

i suspect some kobject related race, and i have the feeling this all is 
timing dependent.

Andrew started seeing reboot hangs roughly around the time when the 
kobject changes went upstream. Given that x86.git had flux in that 
timeframe too i couldnt be sure what caused them.

i have the fixlet below in x86.git but it didnt solve Andrew's problem 
so it's parking now at the end of the queue, with no clear purpose in 
life :-) If it would solve someone's problem it might be revitalized.

Note: this does not fix any particular bug i know about, it's just a 
hack.

	Ingo

------------------------------>
Subject: x86: highprio shutdown hack
From: Ingo Molnar <mingo@elte.hu>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 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 @@ static void native_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;
+		int ret;
+
+		schedparm.sched_priority = 99;
+		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.

  reply	other threads:[~2008-02-14 23:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 15:23 [2.6.25-rc0 System no longer powers off after shutdown Frans Pop
2008-02-11 20:53 ` Cacy Rodney
2008-02-12 20:39 ` [2.6.25-rc1] " Frans Pop
2008-02-12 20:56   ` Greg KH
2008-02-12 21:45     ` Frans Pop
2008-02-13  7:54       ` Andrew Morton
2008-02-13  8:23         ` Jeff Chua
2008-02-13  9:24         ` Frans Pop
2008-02-13 11:39     ` Frans Pop
2008-02-13 16:58       ` Greg KH
2008-02-13 18:55         ` Rafael J. Wysocki
2008-02-15  6:59           ` Greg KH
2008-02-15  8:52             ` Jeff Chua
2008-02-15 21:00               ` Greg KH
2008-02-13 19:28         ` Frans Pop
2008-02-14 23:38         ` Yinghai Lu
2008-02-14 23:48           ` Ingo Molnar [this message]
2008-02-15  0:06             ` Yinghai Lu
2008-02-15  2:14             ` Yinghai Lu
2008-02-15  3:45               ` Yinghai Lu
2008-02-15  6:52           ` Greg KH
2008-02-15  8:41             ` Yinghai Lu
2008-02-15 20:58               ` Greg KH
2008-02-15  6:57           ` Greg KH
2008-02-15 10:19             ` Frans Pop
2008-02-15 19:38               ` Yinghai Lu
2008-02-15 20:31                 ` Yinghai Lu
2008-02-15 20:58                 ` Greg KH
2008-02-15 20:58               ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080214234832.GA14363@elte.hu \
    --to=mingo@elte.hu \
    --cc=elendil@planet.nl \
    --cc=gregkh@suse.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox