[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option |
Date: |
Thu, 19 Jan 2017 15:09:17 +0100 |
On Thu, 19 Jan 2017 09:45:11 +0000
"Daniel P. Berrange" <address@hidden> wrote:
> On Wed, Jan 18, 2017 at 06:13:16PM +0100, Igor Mammedov wrote:
> >
> > Series introduces a new CLI option to allow mapping cpus to numa
> > nodes using public properties [socket|core|thread]-ids instead of
> > internal cpu-index and moving cpu<->node mapping from global bitmaps
> > to PCMachineState struct.
>
> What is the benefit of this change to apps ? Obviously libvirt uses
> the current syntax, but I'm not aware of what problems that has - why
> would libvirt want to use this new syntax instead ?
current syntax -numa cpus=1,2,3... depends on cpu-index which is
internal to QEMU. External users wouldn't actually know which cpu
is associated with which cpu-index without re-implementing cpu-index
assignment which is qemu-version/target/machine/topology dependent.
New '-numa cpu' provides mapping of cpus to numa nodes in
CPU terms that are used with device_add/-device commands.
For management there is query-hotpluggble-cpus command that allows
to get a list of possible cpus with their socket-id/core-id/thread-id
property values.
for example without numa mapping CLI could look like:
$QEMU -M pc -smp 1,sockets=3,maxcpus=3 \
-device qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0
(qemu) info hotpluggable-cpus
Hotpluggable CPUs:
type: "qemu64-x86_64-cpu"
vcpus_count: "1"
CPUInstance Properties:
socket-id: "2"
core-id: "0"
thread-id: "0"
type: "qemu64-x86_64-cpu"
vcpus_count: "1"
qom_path: "/machine/peripheral-anon/device[0]"
CPUInstance Properties:
socket-id: "1"
core-id: "0"
thread-id: "0"
type: "qemu64-x86_64-cpu"
vcpus_count: "1"
qom_path: "/machine/unattached/device[0]"
CPUInstance Properties:
socket-id: "0"
core-id: "0"
thread-id: "0"
based on that list the one could extend CLI with numa mapping:
$QEMU -M pc -smp 1,sockets=3,maxcpus=3 \
-device qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0 \
-numa cpu,socket-id=0,core-id=0,thread-id=0,node-id=0 \
-numa cpu,socket-id=1,core-id=0,thread-id=0,node-id=1 \
-numa cpu,socket-id=2,core-id=0,thread-id=0,node-id=2
(qemu) info hotpluggable-cpus
Hotpluggable CPUs:
type: "qemu64-x86_64-cpu"
vcpus_count: "1"
CPUInstance Properties:
node-id: "2"
socket-id: "2"
core-id: "0"
thread-id: "0"
type: "qemu64-x86_64-cpu"
vcpus_count: "1"
qom_path: "/machine/peripheral-anon/device[0]"
CPUInstance Properties:
node-id: "1"
socket-id: "1"
core-id: "0"
thread-id: "0"
type: "qemu64-x86_64-cpu"
vcpus_count: "1"
qom_path: "/machine/unattached/device[0]"
CPUInstance Properties:
node-id: "0"
socket-id: "0"
core-id: "0"
thread-id: "0"
As it's been discussed previous times, there is chicken/egg
issue where management has to get query-hotpluggble-cpus result
for a specific combination of machine type and -smp option.
It would need to be done at most one time when creating
a configuration and then CLI numa mapping could be used
for starting VM without doing query-hotpluggable-cpus.
'-numa cpu' CLI option is also needed for setting known
mapping on target side of migration.
Previous consensus has been that the only way to avoid 2 stage
discovery/configuration is starting QEMU in paused mode and
than do query + mapping at runtime via QMP before allowing
guest run with 'continue' command.
But this part hasn't been implemented in this series yet.
>
>
> Regards,
> Daniel
- Re: [Qemu-devel] [RFC 09/13] numa: introduce '-numa cpu' cpu option, (continued)
- [Qemu-devel] [RFC 10/13] numa: replace cpu_index_to_socket_id() with cpu_index_to_instance_props(), Igor Mammedov, 2017/01/18
- [Qemu-devel] [RFC 11/13] numa: use new machine.cpu property with -numa cpus=... CLI, Igor Mammedov, 2017/01/18
- [Qemu-devel] [RFC 13/13] pc: cpu: make sure that cpu.node-id matches -numa mapping, Igor Mammedov, 2017/01/18
- [Qemu-devel] [RFC 12/13] pc: drop usage of legacy numa_get_node_for_cpu(), Igor Mammedov, 2017/01/18
- Re: [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option, Daniel P. Berrange, 2017/01/19
- Re: [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option, Igor Mammedov, 2017/01/20