[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1908161217380.1873@nanos.tec.linutronix.de>
Date: Fri, 16 Aug 2019 12:22:22 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Guenter Roeck <linux@...ck-us.net>
cc: Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
Borislav Petkov <bp@...en8.de>
Subject: Re: sched: Unexpected reschedule of offline CPU#2!
On Mon, 29 Jul 2019, Guenter Roeck wrote:
> On Mon, Jul 29, 2019 at 12:47:45PM +0200, Peter Zijlstra wrote:
> > On Mon, Jul 29, 2019 at 12:38:30PM +0200, Thomas Gleixner wrote:
> > > Reboot has two modes:
> > >
> > > - Regular reboot initiated from user space
> > >
> > > - Panic reboot
> > >
> > > For the regular reboot we can make it go through proper hotplug,
> >
> > That seems sensible.
> >
> > > for the panic case not so much.
> >
> > It's panic, shit has already hit fan, one or two more pieces shouldn't
> > something anybody cares about.
> >
>
> Some more digging shows that this happens a lot with Google GCE intances,
> typically after a panic. The problem with that, if I understand correctly,
> is that it may prevent coredumps from being written. So, while of course
> the panic is what needs to be fixed, it is still quite annoying, and it
> would help if this can be fixed for panic handling as well.
>
> How about the patch suggested by Hillf Danton ? Would that help for the
> panic case ?
I have no idea how that patch looks like, but the quick hack is below.
Thanks,
tglx
8<---------------
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 75fea0d48c0e..625627b1457c 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -601,6 +601,7 @@ void stop_this_cpu(void *dummy)
/*
* Remove this CPU:
*/
+ set_cpu_active(smp_processor_id(), false);
set_cpu_online(smp_processor_id(), false);
disable_local_APIC();
mcheck_cpu_clear(this_cpu_ptr(&cpu_info));
Powered by blists - more mailing lists