From: Peter Zijlstra <peterz@infradead.org>
To: Don Zickus <dzickus@redhat.com>
Cc: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
tony.luck@intel.com, seiji.aguchi@hds.com, ak@linux.intel.com,
mjg@redhat.com, levinsasha928@gmail.com
Subject: Re: [PATCH 2/2] x86, reschedule: check to see if system is shutting down
Date: Wed, 15 Feb 2012 18:59:47 +0100 [thread overview]
Message-ID: <1329328787.2293.173.camel@twins> (raw)
In-Reply-To: <20120215155708.GK9751@redhat.com>
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.
next prev parent reply other threads:[~2012-02-15 17:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 20:27 [PATCH 0/2 v2] x86, reboot: cleanup NMI and REBOOT_IRQ Don Zickus
2012-02-13 20:27 ` [PATCH 1/2] x86, reboot: revert stop_other_cpus to using IRQ with NMI fallback Don Zickus
2012-03-02 20:41 ` Seiji Aguchi
2012-03-02 21:11 ` Don Zickus
2012-03-02 21:55 ` Seiji Aguchi
2012-02-13 20:27 ` [PATCH 2/2] x86, reschedule: check to see if system is shutting down Don Zickus
2012-02-13 21:22 ` Seiji Aguchi
2012-02-13 22:43 ` Don Zickus
2012-02-15 11:26 ` Peter Zijlstra
2012-02-15 14:54 ` Don Zickus
2012-02-15 14:57 ` Peter Zijlstra
2012-02-15 15:57 ` Don Zickus
2012-02-15 17:59 ` Peter Zijlstra [this message]
2012-02-16 3:14 ` Don Zickus
-- strict thread matches above, loose matches on Subject: below --
2012-02-10 21:02 [PATCH 0/2] x86, reboot: cleanup NMI and REBOOT_IRQ Don Zickus
2012-02-10 21:02 ` [PATCH 2/2] x86, reschedule: check to see if system is shutting down Don Zickus
2012-02-10 22:42 ` Luck, Tony
2012-02-10 22:53 ` Don Zickus
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=1329328787.2293.173.camel@twins \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=dzickus@redhat.com \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=seiji.aguchi@hds.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).