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

Re: Is xl vcpu-set broken


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Joe Jin <joe.jin@xxxxxxxxxx>
  • Date: Tue, 28 Feb 2023 07:54:41 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YDm0Dstv38waI9rc4uGBTqJnw63Novhl3X7LOfMPgXU=; b=djhMjcn/psWy/6zRukqKCE4FYjaGS4RrgfrMqKLpUUTGlEFYScHuGXuKLcyEBMXapiaMlraNnjEfbtdIbiqsL+pXCVY6WyV2AZ7WokPcaR1UG5jttVN06aibxkvvMEdR3U82t4L2t4BY5eFQnoFCoT2PN/ASaPmEZu7GvhVwMWxexxvV1fEWjiV+lHx+Gsnuw9mTcUtStPiyVtdcgu3BI8TuI3bsLisCNtQNsSSlhCaRaL7AU06wOl+N7RK5fPs4mnID2YnyxH0OooVx9T9exUMeJJMRf/rn8nAPy8iJYF3apeXVMEkxzySOPWBH0BmXN6tn8RM8lYmnwJXNYgm7Dg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WFj2x6VRrW6n/Wo+kaC9if07gfhBpoaJ1Br12uD2CvpEfQn0ErDH69y4XVyDK2dMvd7QByFxFLCMc+e1RX7Fu3HA7EImC8ujgiJ9Q9IIFmo7MqLuVF83MT5LuZeyp+Zg2BOluXiWLemVXurBeYLYidN0te2UBRhphZUm3twkNmiUGrVDdriD5KkuKfiM3PmpJrU8zllpJdeaDYtXehvKOB79V623gk6mW+7gPgDmPmZGj50F40pYRW6w9fKptpfq7UjcsjEuZXGkDOIe9fvsCNAn+bepRg7LKV32ITrnlG3KeO6op8A2zB9KPGbiSv/rdzYHI6pQ2QKM1aOAPSlqWA==
  • Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 28 Feb 2023 15:55:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2/28/23 2:24 AM, Anthony PERARD wrote:
> 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.

Sounds like this still in TODO list but not of build or test env issue.

>
> 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

Tried QMP and looks it does not works:

(QEMU) device_del id=cpu-5
{"error": {"class": "GenericError", "desc": "acpi: device unplug request for 
not supported device type: qemu32-i386-cpu"}}


Thanks so much for your input!

Cheers,
Joe




 


Rackspace

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