On Fri, Aug 04, 2006 at 06:55:17PM +0100, Daniel P. Berrange wrote:
On Fri, Aug 04, 2006 at 05:45:41AM -0400, Daniel Veillard wrote:
> On Thu, Aug 03, 2006 at 03:32:46PM +0200, Philippe Berthault wrote:
> I had a few things to change:
> - discard // based comments to stick just to /*
> - apply the header patch to libvirt.h.in not to the generated header
> - shorten some comments to fit in 80 characters wide
> - renamed the macros adding the VIR_ prefix to avoid potential name
> collision with other headers
I added 3 more convenience macros:
VIR_NODEINFO_MAXCPUS(nodeinfo)
VIR_CPU_MAPLEN(cpu)
VIR_CPU_FULL_MAPLEN(vcpu, cpu)
To hide the maths from developers.
I also bug-fixed the pin cpu method which mistakenly checked for vcpu < 1
instead of vcpu < 0 when validating args.
See atached patch for these changes
One more:
- expose the new APIs via virsh. Michael originally suggsted pretty much
following the style of 'xm vcpu-pin' and 'vcpu-list'. Seems like a
fairly
reasonable pattern to follow.
See the attached patch which adds these commands. eg:
# ~berrange/usr/bin/virsh vcpuinfo Demo03
VCPU: 0
CPU: 1
State: blocked
CPU time: 13.4s
CPU Affinity: y-
VCPU: 1
CPU: 0
State: blocked
CPU time: 5.0s
CPU Affinity: -y
# ~berrange/usr/bin/virsh vcpupin Demo03 1 0,1
# ~berrange/usr/bin/virsh vcpuinfo Demo03
VCPU: 0
CPU: 1
State: blocked
CPU time: 13.4s
CPU Affinity: -y
VCPU: 1
CPU: 1
State: blocked
CPU time: 5.0s
CPU Affinity: yy
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|