From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: David Rientjes <rientjes@google.com>
Cc: a.p.zijlstra@chello.nl, mingo@kernel.org, pjt@google.com,
paul@paulmenage.org, akpm@linux-foundation.org, rjw@sisk.pl,
nacc@us.ibm.com, paulmck@linux.vnet.ibm.com, tglx@linutronix.de,
seto.hidetoshi@jp.fujitsu.com, tj@kernel.org,
mschmidt@redhat.com, berrange@redhat.com,
nikunj@linux.vnet.ibm.com, vatsa@linux.vnet.ibm.com,
liuj97@gmail.com, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v3 0/5] CPU hotplug, cpusets: Fix issues with cpusets handling during suspend/resume
Date: Tue, 15 May 2012 17:40:36 +0530 [thread overview]
Message-ID: <4FB247BC.3020400@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205141654080.25235@chino.kir.corp.google.com>
On 05/15/2012 05:28 AM, David Rientjes wrote:
> On Mon, 14 May 2012, Srivatsa S. Bhat wrote:
>
>> Currently the kernel doesn't handle cpusets properly during suspend/resume.
>> After a resume, all non-root cpusets end up having only 1 cpu (the boot cpu),
>> causing massive performance degradation of workloads. One major user of cpusets
>> is libvirt, which means that after a suspend/hibernation cycle, all VMs
>> suddenly end up running terribly slow!
>>
>> Also, the kernel moves the tasks from one cpuset to another during CPU hotplug
>> in the suspend/resume path, leading to a task-management nightmare after
>> resume.
>>
>
> To deal with mempolicy rebinding when a cpuset changes, I made a change to
> mempolicies to store the user nodemask passed to set_mempolicy() or
> mbind() so the intention of the user could be preserved. It seems like
> you should do the same thing for cpusets to store the "intended" set of
> cpus and respect that during cpu online?
>
Well, I think Nishanth addressed this one already.. As he said, that idea was
implemented in v2 of the patchset[1], and it turned out to be against hotplug
semantics, as pointed out by Peter Zijlstra.
[1]. http://thread.gmane.org/gmane.linux.documentation/4805
>> Patches 1 & 2 are cleanups that separate out hotplug handling so that we can
>> implement different logic for different hotplug events (CPU/Mem
>> online/offline). This also leads to some optimizations and more importantly
>> prepares the ground for any further work dealing with cpusets during hotplug.
>>
>> Patch 3 is a bug fix - it ensures that the tasks attached to the root cpuset
>> see the updated cpus_allowed mask upon CPU hotplug.
>>
>> Patches 4 and 5 implement the fix for cpusets handling during suspend/resume.
>
> All of your patches are labeled to stable@vger.kernel.org, but I seriously
> doubt any of this is stable material since it has been a long-standing
> issue (and perhaps intentional in some cases)
Yes, it is a long-standing issue (bug), but it is not intentional.
People are struggling to deal with this kernel bug for suspend/resume and
there have been numerous bug-reports and stuff everywhere. It is high-time we
fix this in the kernel and get it into stable kernels too (because they too have
this bug).
> and your series includes
> cleanups and optimizations that wouldn't be stable candidates, so I'd
> suggest removing that annotation.
>
Well, the existing code was so messed up that I didn't have a choice but to
clean it up before fixing the suspend/resume case. Had I tried to implement
the fix without cleaning it up, it would have been absolutely horrible, I believe.
And the optimizations? those are just side effects of that cleanup! That really
tells the extent to which it was messed up in the first place!
Regards,
Srivatsa S. Bhat
prev parent reply other threads:[~2012-05-15 12:11 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-13 23:14 [PATCH v3 0/5] CPU hotplug, cpusets: Fix issues with cpusets handling during suspend/resume Srivatsa S. Bhat
2012-05-13 23:15 ` [PATCH v3 1/5] cpusets, hotplug: Implement cpuset tree traversal in a helper function Srivatsa S. Bhat
2012-05-15 0:03 ` David Rientjes
2012-05-15 12:15 ` Srivatsa S. Bhat
2012-05-15 18:04 ` David Rientjes
2012-05-13 23:15 ` [PATCH v3 2/5] cpusets, hotplug: Restructure functions that are invoked during hotplug Srivatsa S. Bhat
2012-05-15 0:27 ` David Rientjes
2012-05-15 12:25 ` Srivatsa S. Bhat
2012-05-13 23:16 ` [PATCH v3 3/5] cpusets: Update tasks' cpus_allowed mask upon updates to root cpuset Srivatsa S. Bhat
2012-05-15 0:31 ` David Rientjes
2012-05-13 23:16 ` [PATCH v3 4/5] cpusets: Add provisions for distinguishing CPU Hotplug in suspend/resume path Srivatsa S. Bhat
2012-05-15 0:33 ` David Rientjes
2012-05-15 12:29 ` Srivatsa S. Bhat
2012-05-15 18:34 ` David Rientjes
2012-05-15 19:17 ` Srivatsa S. Bhat
2012-05-15 20:39 ` David Rientjes
2012-05-13 23:17 ` [PATCH v3 5/5] cpusets, suspend: Save and restore cpusets during suspend/resume Srivatsa S. Bhat
2012-05-15 0:37 ` David Rientjes
2012-05-15 1:40 ` Nishanth Aravamudan
2012-05-15 4:04 ` David Rientjes
2012-05-15 4:45 ` Nishanth Aravamudan
2012-05-15 18:31 ` David Rientjes
2012-05-15 20:10 ` Peter Zijlstra
2012-05-15 21:05 ` David Rientjes
2012-05-15 21:08 ` Peter Zijlstra
2012-05-15 21:21 ` Srivatsa S. Bhat
2012-05-15 21:24 ` Peter Zijlstra
2012-05-15 21:24 ` David Rientjes
2012-05-15 21:42 ` Srivatsa S. Bhat
2012-05-15 21:49 ` David Rientjes
2012-05-15 22:16 ` Srivatsa S. Bhat
2012-05-15 22:32 ` David Rientjes
2012-05-16 8:20 ` Srivatsa S. Bhat
2012-05-16 8:42 ` Srivatsa S. Bhat
2012-05-16 21:24 ` Peter Zijlstra
2012-05-17 9:57 ` Srivatsa S. Bhat
2012-05-15 21:13 ` Peter Zijlstra
2012-05-15 21:37 ` David Rientjes
2012-05-15 9:24 ` Srivatsa S. Bhat
2012-05-14 23:58 ` [PATCH v3 0/5] CPU hotplug, cpusets: Fix issues with cpusets handling " David Rientjes
2012-05-15 12:10 ` Srivatsa S. Bhat [this message]
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=4FB247BC.3020400@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=berrange@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=mingo@kernel.org \
--cc=mschmidt@redhat.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=rientjes@google.com \
--cc=rjw@sisk.pl \
--cc=seto.hidetoshi@jp.fujitsu.com \
--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).