lkml.org 
[lkml]   [2012]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] x86, reschedule: check to see if system is shutting down
From
Date
On Wed, 2012-02-15 at 10:57 -0500, Don Zickus wrote:

> > nope.. same problem, you're not telling anybody you're shooting CPUs
> > down -- this telling is usually done through cpu hotplug notifiers that
> > fix up state.
>
> Why? If you have successfully sync'd up the cpus, stopped them and then
> run a 'stop_cpu' function, you stop all those WARN_ONs I would think.

So the one you're running in here is native_smp_send_reschedule(), its
send by the scheduler to kick a remote cpu. Doing kstopmachine()
flipping online bits and calling hlt with irqs disabled doesn't inform
the scheduler those CPUs aren't actually around anymore.

> And
> how much do we care that we fix up the state on a shutdown? We have
> already shutdown all the processes and unmounted the disks? Most of the
> drivers have probably been shutdown cleanly. What is left that we have to
> be polite?

Dunno, probably not much, but things like RCU might just want to try and
wait for remote CPUs to complete their grace period, which'll be a while
with them being quite dead.

There might also still be work left in workqueues, timers left on timer
wheels etc.. timers won't tick since their apic is dead along with the
cpu, so that shouldn't be a big problem unless someone is waiting for
one to complete. Similar with workqueues, I guess since tasks won't get
scheduled.

But the scheduler is still up and thinking its got all these CPUs,
poking them and getting WARNed about it.

> > The only way is to unplug all cpus except the one. Problem with that is
> > that we cannot (as of yet) unplug the boot cpu.
>
> Yeah, well we can migrate to the boot cpu. I think powerpc does that for
> kdump.

Right, there's that.


\
 
 \ /
  Last update: 2012-02-15 19:03    [W:0.072 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site