I'm curios do we really care about we lost the intermediate value.
For example, considering user do vcpu-set 2 (i.e set vcpu number to 2),
vcpu-set 4, and vcpu-set 2, and guest didn't take any action at all, would it
be really so important? Or, if it is 2->4->3, should the xm vcpu-set itself
really need care 4 vcpu is bringup in some time?
Especially consider guest (i.e. OS) will take several steps to really utilize
the new added vcpu. For example, when CPU hot-added, Linux kernel will send a
uevent to user space, and ueventd will try to bring up the CPU after get the
event. In a system without properly setup the uevent script, the xm vcpu-set
command will not cause changes to both guest kernel and xen hypervisor at all.
In old kernel, even hot-remove will go-through uevent also. Also, the uevent
script may combine several uevent still, depends on how the script is
implemented.
I think the close loop should happen in caller to the vcpu-set, if the caller
really cares about the result of the command, it should check xen's vcpu status
to check if the command has take effect or not.
Any idea?
Thanks
Yunhong Jiang
>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Ian Jackson
>Sent: Monday, April 19, 2010 11:48 PM
>To: Liu, Jinsong
>Cc: xen-devel; Keir Fraser; Zhai, Edwin; Jiang, Yunhong
>Subject: RE: [Xen-devel] [Question] vcpu-set before or after
>xen_pause_requested
>
>Liu, Jinsong writes ("RE: [Xen-devel] [Question] vcpu-set before or after
>xen_pause_requested"):
>...
>> We keep same (HVM) xm command --> xend server --> xenstore path as
>> PV domain. At /local/domain/(domid)/cpu, we setup vcpu watch and
>> handle at qemu side.
>
>I've looked at your patch 2 and it's not correct because there is no
>acknowledgement back to the utility which changes xenstore. You have
>to close the loop, if for no other reason than if there are two
>xenstore changes in a row which the receiving qemu-dm only gets around
>to dealing with after the second, it will see only the second value.
>
>How does the PV vcpu protocol deal with this ? Doesn't a PV guest
>find out about VCPU changes from Xen ?
>
>Ian.
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|