qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topo


From: Cédric Le Goater
Subject: Re: [PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topology
Date: Tue, 2 May 2023 15:48:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 5/2/23 14:05, Cédric Le Goater wrote:
On 4/25/23 18:14, Pierre Morel wrote:
S390 adds two new SMP levels, drawers and books to the CPU
topology.
The S390 CPU have specific topology features like dedication
and entitlement to give to the guest indications on the host
vCPUs scheduling and help the guest take the best decisions
on the scheduling of threads on the vCPUs.

Let us provide the SMP properties with books and drawers levels
and S390 CPU with dedication and entitlement,

I think CpuS390Entitlement should be introduced in a separate patch and
only under target/s390x/cpu.c. It is machine specific and doesn't belong
to the machine common definitions.

'books' and 'drawers' could also be considered z-specific but High End
POWER systems (16s) have similar topology concepts, at least for drawers :
a group of 4 sockets. So let's keep it that way.


This problably means you will have to rework the get/set property handlers
with strcmp() or simply copy the generated lookup struct :

const QEnumLookup CpuS390Entitlement_lookup = {
     .array = (const char *const[]) {
         [S390_CPU_ENTITLEMENT_AUTO] = "auto",
         [S390_CPU_ENTITLEMENT_LOW] = "low",
         [S390_CPU_ENTITLEMENT_MEDIUM] = "medium",
         [S390_CPU_ENTITLEMENT_HIGH] = "high",
     },
     .size = S390_CPU_ENTITLEMENT__MAX
};

It should be fine.

The enum is required by the set-cpu-topology QMP command in patch 8.
Forget my comment, it would require too much changes in your series
to introduce CPU Entitlement independently.

C.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]