[libvirt] [PATCH 0/2] Fix the display of *virsh vcpuinfo* command.

Yang Dongsheng yangds.fnst at cn.fujitsu.com
Mon May 27 01:57:57 UTC 2013


On 05/24/2013 10:03 PM, Eric Blake wrote:
> On 05/24/2013 03:21 AM, yangdongsheng wrote:
>> Hi,
> [uggh; yet another victim of git's stupidity in using "In-reply-to:<y>"
> if you answer the 'git send-email' question incorrectly - just hit enter
> rather than filling in a response to that question]
>
> Would you mind resending this as a top-level thread, so that it gets
> properly threaded?  My mail client split 0/2 and 2/2 into an old series,
> and 1/2 somewhere else.
:( Sorry to trouble you !
Of course I will do some fix for this patch and resend it.
>>      I found some confusion in display of commad *virsh vcpuinfo domname* .
>> There is no diffrence between a cpu offline and a cpu online but not be set
>> for the affinity of vcpu, both are '-'. But users will find the difference of them
>> in using them for a same action (such as vcpupin) and be confused.
> I'm a bit worried about backward compatibility; if there are existing
> scripts that parse the output, will they be confused if we introduce a
> third symbol?  Then again, offline host cpus are indeed a different
> beast than cpus that the guest has been assigned to, so I think we can
> make this change.
Thanx for your approvement.
>> So, I think we should show the cpu in different state with different symbol.
>>
>> In this patchset, I introduce a symbol 'x' (maybe there is a better one :)) to display
>> the cpu is offline on host.
>>
>> Just like:
>> [root at yds-pc ~]# virsh vcpuinfo virt-tests-vm1
>> VCPU:           0
>> CPU:            0
>> State:          running
>> CPU time:       14.8s
>> CPU Affinity:   y-xy
>>
>>
>> yangdongsheng (2):
>>    tool/virsh-domain.c: Add a vshNodeGetCPUMap function to get cpumap of
>>      host.
>>    tool/virsh-domain.c: Fix the display of Affinity in function
>>      cmdVcpuinfo.
>>
>>   tools/virsh-domain.c |   78 ++++++++++++++++++++++++++++++++++++++++++++++++--
>>   1 file changed, 75 insertions(+), 3 deletions(-)
>>




More information about the libvir-list mailing list