All of lore.kernel.org
 help / color / mirror / Atom feed
* How to query the number of vcpus?
@ 2005-04-29 20:08 Kip Macy
  2005-04-29 20:16 ` Keir Fraser
  2005-04-29 20:18 ` Ryan Harper
  0 siblings, 2 replies; 12+ messages in thread
From: Kip Macy @ 2005-04-29 20:08 UTC (permalink / raw)
  To: xen-devel

What is the right way to query how many vcpus a guest is using? As I
mentioned earlier it would seem to fall under the heading of
GETDOMAININFO, but that obviously doesn't work.

    -Kip

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-04-29 20:08 How to query the number of vcpus? Kip Macy
@ 2005-04-29 20:16 ` Keir Fraser
  2005-04-29 20:18 ` Ryan Harper
  1 sibling, 0 replies; 12+ messages in thread
From: Keir Fraser @ 2005-04-29 20:16 UTC (permalink / raw)
  To: Kip Macy; +Cc: xen-devel


SMP save/restore is work in progress so I expect this kind of vital 
info isn't exported via the control interfaces at all right now.

  -- Keir

On 29 Apr 2005, at 21:08, Kip Macy wrote:

> What is the right way to query how many vcpus a guest is using? As I
> mentioned earlier it would seem to fall under the heading of
> GETDOMAININFO, but that obviously doesn't work.
>
>     -Kip
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-04-29 20:08 How to query the number of vcpus? Kip Macy
  2005-04-29 20:16 ` Keir Fraser
@ 2005-04-29 20:18 ` Ryan Harper
  2005-04-29 20:24   ` Kip Macy
  2005-04-30  9:23   ` Keir Fraser
  1 sibling, 2 replies; 12+ messages in thread
From: Ryan Harper @ 2005-04-29 20:18 UTC (permalink / raw)
  To: Kip Macy; +Cc: xen-devel

* Kip Macy <kip.macy@gmail.com> [2005-04-29 15:09]:
> What is the right way to query how many vcpus a guest is using? As I
> mentioned earlier it would seem to fall under the heading of
> GETDOMAININFO, but that obviously doesn't work.

I posted a [1]patch a while back that surfaced that info in the
GETDOMAININFO call.  I'm still working more into that patch to support
a cpumap which designate which physical cpus a vcpu may use, the current
form of that patch is [2]here.

1.  http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00412.html
2.  http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00890.html

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@us.ibm.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-04-29 20:18 ` Ryan Harper
@ 2005-04-29 20:24   ` Kip Macy
  2005-04-30  9:23   ` Keir Fraser
  1 sibling, 0 replies; 12+ messages in thread
From: Kip Macy @ 2005-04-29 20:24 UTC (permalink / raw)
  To: Ryan Harper; +Cc: xen-devel

Thanks. I need this for coredump and debugging on SMP domains. 

I didn't feel like querying successively higher exec_domains until a
call failed ;-)

               -Kip
     
On 4/29/05, Ryan Harper <ryanh@us.ibm.com> wrote:
> * Kip Macy <kip.macy@gmail.com> [2005-04-29 15:09]:
> > What is the right way to query how many vcpus a guest is using? As I
> > mentioned earlier it would seem to fall under the heading of
> > GETDOMAININFO, but that obviously doesn't work.
> 
> I posted a [1]patch a while back that surfaced that info in the
> GETDOMAININFO call.  I'm still working more into that patch to support
> a cpumap which designate which physical cpus a vcpu may use, the current
> form of that patch is [2]here.
> 
> 1.  http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00412.html
> 2.  http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00890.html
> 
> --
> Ryan Harper
> Software Engineer; Linux Technology Center
> IBM Corp., Austin, Tx
> (512) 838-9253   T/L: 678-9253
> ryanh@us.ibm.com
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-04-29 20:18 ` Ryan Harper
  2005-04-29 20:24   ` Kip Macy
@ 2005-04-30  9:23   ` Keir Fraser
  2005-04-30 14:09     ` David Hopwood
  2005-04-30 14:50     ` Keir Fraser
  1 sibling, 2 replies; 12+ messages in thread
From: Keir Fraser @ 2005-04-30  9:23 UTC (permalink / raw)
  To: Ryan Harper; +Cc: Kip Macy, xen-devel, christian.limpach

> * Kip Macy <kip.macy@gmail.com> [2005-04-29 15:09]:
> > What is the right way to query how many vcpus a guest is using? As I
> > mentioned earlier it would seem to fall under the heading of
> > GETDOMAININFO, but that obviously doesn't work.
> 
> I posted a [1]patch a while back that surfaced that info in the
> GETDOMAININFO call.  I'm still working more into that patch to support
> a cpumap which designate which physical cpus a vcpu may use, the current
> form of that patch is [2]here.
> 
> 1.  http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00412.html
> 2.  http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00890.html

There's already a cpumask in Xen for physical CPUs (or will be -- it's
called cpuset right now, but that's going to change to fit the Linux
convention). 

It probably makes sense to rename cpumap to vcpumask, or at least to
vcpumap.

Also I'd change the appearances of the mask in the dom0 interface from:
 cpumap_t cpumap[MAX_VIRT_CPUS]
And:
 cpumap_t *cpumap
To:
 u8 vcpumask[MAX_VCPUID/8]

Having an array of '_t' is odd as each entry in the array is really
logically just a single bit. And I would like to separate the size of
the array at the admin interfaces from MAX_VIRT_CPUS: it would be nice
to be able to increase MAX_VIRT_CPUS without changing the admin
interface. That's why I'd add something like MAX_VCPUID (probably set
it to 256).

I cc'ed Christian because he is merging one of your patches at the
moment. It might be the one without the cpumap additions though.

 -- Keir

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-04-30  9:23   ` Keir Fraser
@ 2005-04-30 14:09     ` David Hopwood
  2005-04-30 14:50     ` Keir Fraser
  1 sibling, 0 replies; 12+ messages in thread
From: David Hopwood @ 2005-04-30 14:09 UTC (permalink / raw)
  To: xen-devel

Keir Fraser wrote:
> Also I'd change the appearances of the mask in the dom0 interface from:
>  cpumap_t cpumap[MAX_VIRT_CPUS]
> And:
>  cpumap_t *cpumap
> To:
>  u8 vcpumask[MAX_VCPUID/8]

u8 vcpumask[MAX_VCPUID/8 + 1]

> Having an array of '_t' is odd as each entry in the array is really
> logically just a single bit. And I would like to separate the size of
> the array at the admin interfaces from MAX_VIRT_CPUS: it would be nice
> to be able to increase MAX_VIRT_CPUS without changing the admin
> interface. That's why I'd add something like MAX_VCPUID (probably set
> it to 256).

255 (if it's the maximum ID rather than the number of IDs).

-- 
David Hopwood <david.nospam.hopwood@blueyonder.co.uk>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-04-30  9:23   ` Keir Fraser
  2005-04-30 14:09     ` David Hopwood
@ 2005-04-30 14:50     ` Keir Fraser
  1 sibling, 0 replies; 12+ messages in thread
From: Keir Fraser @ 2005-04-30 14:50 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Ryan Harper, Kip Macy, xen-devel, christian.limpach


>> 1.   
>> http://lists.xensource.com/archives/html/xen-devel/2005-04/ 
>> msg00412.html
>> 2.   
>> http://lists.xensource.com/archives/html/xen-devel/2005-04/ 
>> msg00890.html
>
> There's already a cpumask in Xen for physical CPUs (or will be -- it's
> called cpuset right now, but that's going to change to fit the Linux
> convention).
>
> It probably makes sense to rename cpumap to vcpumask, or at least to
> vcpumap.

Just ignore my previous email -- I completely misunderstood that the  
cpumaps you added really are physical cpu maps and not virtual cpu  
maps.

cpumap_t is a reasonable name as at least it won't conflict with type  
names internal to Xen.

However, why pass a pointer to a cpumap_t into PINCPU? And should we  
cater now for systems with too many cpus to be represented by a long?

  -- Keir

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: How to query the number of vcpus?
@ 2005-04-30 18:03 Ian Pratt
  2005-04-30 19:01 ` Keir Fraser
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Pratt @ 2005-04-30 18:03 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Kip Macy, Ryan Harper, xen-devel, christian.limpach

> cpumap_t is a reasonable name as at least it won't conflict 
> with type names internal to Xen.
> 
> However, why pass a pointer to a cpumap_t into PINCPU? And 
> should we cater now for systems with too many cpus to be 
> represented by a long?

I think so -- might as well get the interface right. I was thinking
something like the fd mask that get's passed to select, where you
sepcify the highest set bit.

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-04-30 18:03 Ian Pratt
@ 2005-04-30 19:01 ` Keir Fraser
  0 siblings, 0 replies; 12+ messages in thread
From: Keir Fraser @ 2005-04-30 19:01 UTC (permalink / raw)
  To: Ian Pratt; +Cc: Kip Macy, xen-devel, christian.limpach, Ryan Harper


On 30 Apr 2005, at 19:03, Ian Pratt wrote:

>> cpumap_t is a reasonable name as at least it won't conflict
>> with type names internal to Xen.
>>
>> However, why pass a pointer to a cpumap_t into PINCPU? And
>> should we cater now for systems with too many cpus to be
>> represented by a long?
>
> I think so -- might as well get the interface right. I was thinking
> something like the fd mask that get's passed to select, where you
> sepcify the highest set bit.

In some cases Xen returns a cpumap to the guest (in getdomaininfo). In 
that case the fd mask trick won't really work as the guest needs to 
know in advance the biggetst map that Xen may return. Anyway, a map of 
256 bits is going to give us a fair amount of headroom I think.

  -- Keir

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: How to query the number of vcpus?
@ 2005-05-01  4:21 Ian Pratt
  2005-05-02 15:21 ` Ryan Harper
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Pratt @ 2005-05-01  4:21 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Kip Macy, xen-devel, christian.limpach, Ryan Harper

 
> > I think so -- might as well get the interface right. I was thinking 
> > something like the fd mask that get's passed to select, where you 
> > sepcify the highest set bit.
> 
> In some cases Xen returns a cpumap to the guest (in 
> getdomaininfo). In that case the fd mask trick won't really 
> work as the guest needs to know in advance the biggetst map 
> that Xen may return. Anyway, a map of
> 256 bits is going to give us a fair amount of headroom I think.

Why do we need to ever return a cpumap to the guest? Being able to read
CPU pining information out isn't very useful, and both CPUs and VCPUs
can be enumerated in the normal manner. Is there something I've
forgotten?

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-05-01  4:21 Ian Pratt
@ 2005-05-02 15:21 ` Ryan Harper
  2005-05-02 15:27   ` Keir Fraser
  0 siblings, 1 reply; 12+ messages in thread
From: Ryan Harper @ 2005-05-02 15:21 UTC (permalink / raw)
  To: Ian Pratt; +Cc: Kip Macy, xen-devel, christian.limpach

* Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> [2005-05-02 09:07]:
>  
> > > I think so -- might as well get the interface right. I was thinking 
> > > something like the fd mask that get's passed to select, where you 
> > > sepcify the highest set bit.
> > 
> > In some cases Xen returns a cpumap to the guest (in 
> > getdomaininfo). In that case the fd mask trick won't really 
> > work as the guest needs to know in advance the biggetst map 
> > that Xen may return. Anyway, a map of
> > 256 bits is going to give us a fair amount of headroom I think.
> 
> Why do we need to ever return a cpumap to the guest? Being able to read
> CPU pining information out isn't very useful, and both CPUs and VCPUs
> can be enumerated in the normal manner. Is there something I've
> forgotten?

If I were writing a load-balancing app I'd like to know where a domains'
vcpus are pinnable.  You had previously requested the cpumap to support
setting a list of physical cpus on which a vcpu can run.  It seems odd
(to me) to allow the setting of a variable, but to not be able to see what
the current value is.  Such an interface requires me to always send a
pin operation to ensure the cpumap is set how I want since I cannot
confirm the current value.

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@us.ibm.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to query the number of vcpus?
  2005-05-02 15:21 ` Ryan Harper
@ 2005-05-02 15:27   ` Keir Fraser
  0 siblings, 0 replies; 12+ messages in thread
From: Keir Fraser @ 2005-05-02 15:27 UTC (permalink / raw)
  To: Ryan Harper; +Cc: Kip Macy, Ian Pratt, xen-devel, christian.limpach


On 2 May 2005, at 16:21, Ryan Harper wrote:

> If I were writing a load-balancing app I'd like to know where a 
> domains'
> vcpus are pinnable.  You had previously requested the cpumap to support
> setting a list of physical cpus on which a vcpu can run.  It seems odd
> (to me) to allow the setting of a variable, but to not be able to see 
> what
> the current value is.  Such an interface requires me to always send a
> pin operation to ensure the cpumap is set how I want since I cannot
> confirm the current value.

Makes sense to me. cpumap_t should be bigger than a long then, to allow 
for future growth.

  -- Keir

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-05-02 15:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-29 20:08 How to query the number of vcpus? Kip Macy
2005-04-29 20:16 ` Keir Fraser
2005-04-29 20:18 ` Ryan Harper
2005-04-29 20:24   ` Kip Macy
2005-04-30  9:23   ` Keir Fraser
2005-04-30 14:09     ` David Hopwood
2005-04-30 14:50     ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2005-04-30 18:03 Ian Pratt
2005-04-30 19:01 ` Keir Fraser
2005-05-01  4:21 Ian Pratt
2005-05-02 15:21 ` Ryan Harper
2005-05-02 15:27   ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.