From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: balbir@linux.vnet.ibm.com
Cc: "Brown, Len" <len.brown@intel.com>,
"Darrick J. Wong" <djwong@us.ibm.com>,
Gautham R Shenoy <ego@in.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>, Pavel Machek <pavel@ucw.cz>,
"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
"Li, Shaohua" <shaohua.li@intel.com>, Ingo Molnar <mingo@elte.hu>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 0/3] cpu: idle state framework for offline CPUs.
Date: Sun, 16 Aug 2009 23:53:22 +0200 [thread overview]
Message-ID: <1250459602.8648.35.camel@laptop> (raw)
In-Reply-To: <20090816194441.GA22626@balbir.in.ibm.com>
On Mon, 2009-08-17 at 01:14 +0530, Balbir Singh wrote:
> * Dipankar Sarma <dipankar@in.ibm.com> [2009-08-16 23:56:29]:
>
> > On Fri, Aug 14, 2009 at 01:30:21PM +0200, Pavel Machek wrote:
> > > >
> > > > It depends on the hypervisor implementation. On pseries (powerpc)
> > > > hypervisor, for example, they are different. By offlining a vcpu
> > > > (and in turn shutting a cpu), you will actually create a configuration
> > > > change in the VM that is visible to other systems management tools
> > > > which may not be what the system administrator wanted. Ideally,
> > > > we would like to distinguish between these two states.
> > > >
> > > > Hope that suffices as an example.
> > >
> > > So... you have something like "physically pulling out hotplug cpu" on
> > > powerpc.
> >
> > If any system can do physical unplug, then it should do "offline"
> > with configuration changes reflected in the hypervisor and
> > other system configuration software.
> >
> > > But maybe it is useful to take already offline cpus (from linux side),
> > > and make that visible to hypervisor, too.
> > >
> > > So maybe something like "echo 1 > /sys/devices/system/cpu/cpu1/unplug"
> > > would be more useful for hypervisor case?
> >
> > On pseries, we do an RTAS call ("stop-cpu") which effectively permantently
> > de-allocates it from the VM hands over the control to hypervisor. The
> > hypervisors may do whatever it wants including allocating it to
> > another VM. Once gone, the original VM may not get it back depending
> > on the situation.
> >
> > The point I am making is that we may not always want to *release*
> > the CPU to hypervisor and induce a configuration change. That needs
> > to be reflected by extending the existing user interface - hence
> > the proposal for - /sys/devices/system/cpu/cpu<#>/state and
> > /sys/devices/system/cpu/cpu<#>/available_states. It allows
> > ceding to hypervisor without de-allocating. It is a minor
> > extension of the existing interface keeping backwards compatibility
> > and platforms can allow what make sense.
> >
>
>
> Agreed, I've tried to come with a little ASCII art to depict your
> scenairos graphically
>
>
> +--------+ don't need (offline)
> | OS +----------->+------------+
> +--+-----+ | hypervisor +-----> Reuse CPU
> | | | for something
> | | | else
> | | | (visible to users)
> | | | as resource changed
> | +----------- +
> V (needed, but can cede)
> +------------+
> | hypervisor | Don't reuse CPU
> | | (CPU ceded)
> | | give back to OS
> +------------+ when needed.
> (Not visible to
> users as so resource
> binding changed)
I still don't get it... _why_ should this be exposed in the guest
kernel? Why not let the hypervisor manage a guest's offline cpus in a
way it sees fit?
next prev parent reply other threads:[~2009-08-16 21:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 14:25 [PATCH 0/3] cpu: idle state framework for offline CPUs Gautham R Shenoy
2009-08-05 14:25 ` [PATCH 1/3] cpu: Offline state Framework Gautham R Shenoy
2009-08-05 14:26 ` [PATCH 2/3] cpu: Implement cpu-offline-state callbacks for pSeries Gautham R Shenoy
2009-08-05 14:26 ` [PATCH 3/3] pSeries: cpu: Cede CPU during a deactivate-offline Gautham R Shenoy
2009-08-06 1:58 ` [PATCH 0/3] cpu: idle state framework for offline CPUs Shaohua Li
2009-08-06 4:33 ` Vaidyanathan Srinivasan
2009-08-06 15:03 ` Peter Zijlstra
2009-08-06 15:13 ` Peter Zijlstra
2009-08-09 12:08 ` Pavel Machek
2009-08-06 13:48 ` Gautham R Shenoy
2009-08-07 1:02 ` Shaohua Li
2009-08-09 12:08 ` Pavel Machek
2009-08-09 13:22 ` Rafael J. Wysocki
2009-08-10 2:00 ` Vaidyanathan Srinivasan
2009-08-10 8:19 ` Pavel Machek
2009-08-11 0:22 ` Pallipadi, Venkatesh
2009-08-11 17:53 ` Dipankar Sarma
2009-08-12 11:58 ` Pavel Machek
2009-08-12 12:05 ` Peter Zijlstra
2009-08-12 19:57 ` Dipankar Sarma
2009-08-13 0:45 ` Len Brown
2009-08-13 4:59 ` Dipankar Sarma
2009-08-14 11:30 ` Pavel Machek
2009-08-16 18:26 ` Dipankar Sarma
2009-08-16 19:44 ` Balbir Singh
2009-08-16 21:53 ` Peter Zijlstra [this message]
2009-08-17 6:24 ` Dipankar Sarma
2009-08-17 7:15 ` Peter Zijlstra
2009-08-17 7:58 ` Dipankar Sarma
2009-08-17 14:40 ` Dipankar Sarma
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=1250459602.8648.35.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=balbir@linux.vnet.ibm.com \
--cc=djwong@us.ibm.com \
--cc=ego@in.ibm.com \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@elte.hu \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=shaohua.li@intel.com \
--cc=venkatesh.pallipadi@intel.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).