From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: paulmck@linux.vnet.ibm.com
Cc: Alan Stern <stern@rowland.harvard.edu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Nishanth Aravamudan <nacc@linux.vnet.ibm.com>,
"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
mingo@kernel.org, pjt@google.com, paul@paulmenage.org,
akpm@linux-foundation.org, nacc@us.ibm.com, tglx@linutronix.de,
seto.hidetoshi@jp.fujitsu.com, rob@landley.net, tj@kernel.org,
mschmidt@redhat.com, berrange@redhat.com,
nikunj@linux.vnet.ibm.com, vatsa@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 0/7] CPU hotplug, cpusets: Fix issues with cpusets handling upon CPU hotplug
Date: Sat, 5 May 2012 20:56:03 +0200 [thread overview]
Message-ID: <201205052056.04144.rjw@sisk.pl> (raw)
In-Reply-To: <20120505174406.GD2470@linux.vnet.ibm.com>
On Saturday, May 05, 2012, Paul E. McKenney wrote:
> On Sat, May 05, 2012 at 11:24:55AM -0400, Alan Stern wrote:
> > On Fri, 4 May 2012, Peter Zijlstra wrote:
> >
> > > That said, the whole suspend/resume 'problem' does seem worth fixing and
> > > is a very special case where we absolutely know we're going to get back
> > > in the state we are in and userspace isn't actually running. So ideally
> > > we'd go with the bhat's patch that skips the sched_domain rebuilds
> > > entirely +- some bug-fixes ;-).
> >
> > Just as an interesting side comment...
> >
> > The USB subsystem faced this same problem years ago. The question was:
> > When a USB device (especially a mass-storage device) is unplugged and
> > then reconnected, is the new device instance the same as the old one?
> > Linus stepped in and firmly assured us that it was not. That's very
> > much like the situation you're describing: If CPU 4 is hot-unplugged
> > and then a new CPU appears in slot 4, is it the same CPU as before (and
> > does it therefore belong to the same cpusets as before)?
> >
> > But this led to problems during suspend, because not all systems could
> > maintain bus connectivity while the system was asleep, and almost none
> > can during hibernation. As a result, mounted filesystems would become
> > unavailable after resume even though the USB storage device had been
> > plugged in the whole time. To the kernel, it appeared that the device
> > had been unplugged during suspend and then replugged during resume.
> >
> > We ended up adopting a special-purpose solution just to handle that
> > case. It's described in Documentation/usb/persist.txt if you want the
> > full details. In brief, when the system resumes it checks to see if a
> > device appears to be present at the same port where a device used to
> > be. If it is, and if its descriptors match the values remembered for
> > the former device, then we accept the new device as being the same as
> > the old one, even though the hardware indicates that the connection was
> > not maintained during the system sleep.
> >
> > >From my point of view, this suggests that CPU hot-unplug is not quite
> > the right tool to use during suspend. The CPU doesn't actually go
> > away; it merely becomes unusable for a while. In other words, this
> > approach applies an incorrect abstraction. What's really needed is
> > something a little different: a way to avoid running any tasks on that
> > CPU while not removing it from the system. If this means some tasks
> > can no longer run on any CPUs, so be it -- this happens only during
> > suspend, after all. Then during resume, when the CPU is brought back
> > up, tasks are allowed to run on it again.
>
> If I understand correctly, Thomas Gleixner is pushing in this direction,
> allowing CPUs to be brought down partially (preventing anything from
> running on it) or completely. The big obstacle in current kernel
> is lack of organized way of bringing CPUs down.
Yet, this is the only viable way to go, IMHO.
Thanks,
Rafael
next prev parent reply other threads:[~2012-05-05 18:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 19:17 [PATCH v2 0/7] CPU hotplug, cpusets: Fix issues with cpusets handling upon CPU hotplug Srivatsa S. Bhat
2012-05-04 19:17 ` [PATCH v2 1/7] cpusets, hotplug: Implement cpuset tree traversal in a helper function Srivatsa S. Bhat
2012-05-04 19:18 ` [PATCH v2 2/7] cpusets, hotplug: Restructure functions that are invoked during hotplug Srivatsa S. Bhat
2012-05-04 19:18 ` [PATCH v2 3/7] cpusets: Introduce 'user_cpus_allowed' and rework the semantics of 'cpus_allowed' Srivatsa S. Bhat
2012-05-04 19:19 ` [PATCH v2 4/7] CPU hotplug, cpusets: Workout hotplug handling for cpusets Srivatsa S. Bhat
2012-05-04 19:19 ` [PATCH v2 5/7] Docs, cpusets: Update the cpuset documentation Srivatsa S. Bhat
2012-05-04 22:28 ` Rob Landley
2012-05-04 19:20 ` [PATCH v2 6/7] cpusets: Optimize the implementation of guarantee_online_cpus() Srivatsa S. Bhat
2012-05-04 19:20 ` [PATCH v2 7/7] cpusets: Remove out-dated comment about cpuset_track_online_cpus Srivatsa S. Bhat
2012-05-04 19:24 ` [PATCH v2 0/7] CPU hotplug, cpusets: Fix issues with cpusets handling upon CPU hotplug Peter Zijlstra
2012-05-04 19:58 ` Srivatsa S. Bhat
2012-05-04 20:14 ` Peter Zijlstra
2012-05-04 20:28 ` Peter Zijlstra
2012-05-04 20:49 ` Nishanth Aravamudan
2012-05-04 21:01 ` Peter Zijlstra
2012-05-04 21:27 ` Nishanth Aravamudan
2012-05-04 21:32 ` Peter Zijlstra
2012-05-04 21:34 ` Peter Zijlstra
2012-05-04 21:57 ` Nishanth Aravamudan
2012-05-04 21:38 ` Peter Zijlstra
2012-05-04 20:46 ` Nishanth Aravamudan
2012-05-04 20:56 ` Peter Zijlstra
2012-05-04 21:30 ` Nishanth Aravamudan
2012-05-04 21:44 ` Peter Zijlstra
2012-05-05 15:24 ` Alan Stern
2012-05-05 17:44 ` Paul E. McKenney
2012-05-05 18:56 ` Rafael J. Wysocki [this message]
2012-05-08 13:07 ` Daniel P. Berrange
2012-05-05 4:39 ` Mike Galbraith
2012-05-05 17:15 ` Srivatsa S. Bhat
2012-05-07 15:26 ` Jiang Liu
2012-05-09 9:12 ` Srivatsa S. Bhat
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=201205052056.04144.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=berrange@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mschmidt@redhat.com \
--cc=nacc@linux.vnet.ibm.com \
--cc=nacc@us.ibm.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=paul@paulmenage.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pjt@google.com \
--cc=rob@landley.net \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vatsa@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).