How to query the number of vcpus?
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
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
Quoted 10 lines · Kip Macy
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
[email protected]
http://lists.xensource.com/xen-devel
Quoted 3 lines · Kip Macy
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
Signature · 5 lines
Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 [email protected]
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
Quoted 20 lines · Ryan Harper
Quoted 3 lines · Kip Macy
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
[email protected]
Quoted 5 lines · Kip Macy
Quoted 3 lines
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.
Quoted 7 lines
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
Quoted 6 lines · Keir Fraser
Also I'd change the appearances of the mask in the dom0 interface from:
cpumap_tcpumap[MAX_VIRT_CPUS]
And:
cpumap_t*cpumap
To:
u8 vcpumask[MAX_VCPUID/8]
u8 vcpumask[MAX_VCPUID/8 + 1]
Quoted 6 lines
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 increaseMAX_VIRT_CPUSwithout changing the admin interface. That's why I'd add something likeMAX_VCPUID(probably set it to 256).
255 (if it's the maximum ID rather than the number of IDs).
Signature · 1 line
David Hopwood <[email protected]>
Quoted 10 lines
Quoted 3 lines
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.htmlThere'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