[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is xl vcpu-set broken


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 28 Feb 2023 10:24:35 +0000
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Joe Jin <joe.jin@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 28 Feb 2023 10:24:49 +0000
  • Ironport-data: A9a23:vSojrK/lzSnbegvQ8RLyDrUDTH6TJUtcMsCJ2f8bNWPcYEJGY0x3x mIXWWmBO67YZTb2Kttxa9jn9kpXuJ6En99hHFY/+Xg8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kI/1BjOkGlA5AdmP6ob5Aa2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklk0 NkRdGs2YCzaiti/7IO+RsdBl5saeZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUqGOkcUUrsUIMtWcOOAj3/jczpeuRSNqLA++WT7xw1tyrn9dtHSf7RmQO0EzhnD/ jqWpAwVBDk7btGYkTOG+U6R3NDIliLDAqEAS7eno6sCbFq7mTVIVUx+uUGAifuzh1O6WtlfA 1cJ4Sdopq83nGSpSdS7XRy+iHmetxUYVpxbFOhSwAuK0KvPpQGCGnIDUCVCefQhrsY9QTFs3 ViM9/v5CDoqvLCLRHa18raPsSj0KSUTNXUFZyIPUU0C+daLiIgrgwjGVNpLDK+/hdqzEjb1q w1mtwBn2e9V15RSkfzmoxae2WnESoX1ohAdzCDyVz7+1Q1FPYOfbqCZ7FT1wOcfFdPMJrWeh 0Qsl8+b5eEIKJiCki2RXekAdI2UC+a53C702gA2QcR4n9i50zv6JN0LvmkiTKt8GpxcEQIFd nM/ru+4CHV7GHKxJZF6bIuqYyjB5fixTI+1Phw4gzcnX3SQSONl1HszDaJz9zq3+KTJrU3YE cbzTCpUJSxGYZmLNRLvLwvn7Zclxzol2UTYTo3hwhKs3NK2PSDKFupfagrWMrFlvctoRTk5F P4FaqO3J+h3CrWiMkE7D6ZIRbz1EZTLLc+v8JEGHgJyCgFnBHsgG5fsLUAJIuRYc1Buvr6Qp BmVAxYIoGcTcFWbcW1mnFg/MuKwNXu+xFpnVRER0aGAgCF6MN31t/dCJvPav9APrYRe8BK9d NFdE+3oPxiFYm2vF+g1BXUlkLFfSQ==
  • Ironport-hdrordr: A9a23:1znaP6/06VvgkLQlYzduk+D6I+orL9Y04lQ7vn2ZKCY7TiX8ra uTdZsgpHrJYVoqNE3I5+rhBEDwex3hHPdOiOF9AV7hZniEhIKGFvAE0WKI+Vzd8kPFh4xg/J tBN45jFdb3EV92tsri5hKkeuxQuOVviJrY4ds31B1WPGdXgkxbnn5E4o33KCdLeDU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Feb 28, 2023 at 10:37:00AM +0100, Jan Beulich wrote:
> On 28.02.2023 07:44, Joe Jin wrote:
> > We encountered a vcpu-set issue on old xen, when I tried to confirm
> > if xen upstream xen has the same issue I find neither my upstream build
> > nor ubuntu 22.04 xen-hypervisor-4.16 work.
> > 
> > I can add vcpus(8->16) to my guest but I can not reduce vcpu number:
> > 
> > root@ubuntu2204:~/vm# xl list
> > Name                                        ID   Mem VCPUs    State    
> > Time(s)
> > Domain-0                                     0 255424    32     r-----     
> > 991.9
> > testvm                                       1   4088    16     -b----      
> > 94.6
> > root@ubuntu2204:~/vm# xl vcpu-set testvm 8
> > root@ubuntu2204:~/vm# xl list
> > Name                                        ID   Mem VCPUs    State    
> > Time(s)
> > Domain-0                                     0 255424    32     r-----     
> > 998.5
> > testvm                                       1   4088    16     -b----      
> > 97.3
> > 
> > After xl vcpu-set, xenstore showed online cpu number reduced to 8:
[...]
> > 
> > But guest did not received any offline events at all.
> > 
> > From source code my understand is for cpu online, libxl will
> > send device_add to qemu to trigger vcpu add, for cpu offline,
> > it still rely on xenstore, is this correct?
> 
> Judging from the DSDT we provide, offlining looks to also be intended to
> go the ACPI way. Whereas libxl only ever sends "device_add" commands to
> qemu, afaics (or "cpu-add" for older qemu). Anthony - do you have any
> insight what the intentions here are?

The intention is to one day implement cpu offline in QEMU upstream for
HVM guest, I don't think that's ever been done so far.

As we use device_add for cpu hotplug, we would probably do device_del
for hot-unplug, so qemu would still have to send the appropriate even to
the guest.

Someone will have to figure out if "device_del" works with a Xen guest,
doc here:
    https://www.qemu.org/docs/master/system/cpu-hotplug.html#vcpu-hot-unplug

Cheers,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.