RFC numa: add '-numa cpu' option
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest13 patches 23 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
2 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Eduardo Habkost |
|---|---|
| 1/13 | |
| 2/13 | R-b |
| 3/13 | R-b |
| 4/13 | |
| 5/13 | |
| 6/13 | |
| 7/13 | |
| 8/13 | |
| 9/13 | |
| 10/13 | |
| 11/13 | |
| 12/13 | |
| 13/13 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option
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.
It focuses on PC in RFC version to see if approach is suitable in general, later we can move generic parts to common code or do a bigger non RFC version of this series that would take care of all concerned targets (arm-virt/spapr/pc).
Thing which I've kept PC specific but could be generalized is:
* moving array possible_cpus to generic MachineState where
we already have possible_cpu_arch_ids(). I plan to reuse it in virt-arm for CPU hotplug/-device cpu support and as this series shows it also could be used for numa mapping.
Perhaps it could be used in simmilar manner for core based SPAPR but I haven't looked it yet. So any opions on if we should move it there.
So far it only provides CLI interface to do mapping, there is no QMP one as I haven't found a suitable place/way to update/set mapping after machine_done for QEMU started with -S (stoppod mode) so that mgmt could query hopluggable-cpus first, then map them to numa nodes in runtime before actually allowing guest to run.
Any suggestions on how to make it work are welcome.
PS:
skipped travis-ci build as currently it seems to be broken.
Igor Mammedov (13):
numa: access CPU's node id via property in hmp_info_numa()
pc: cleanup: move smbios_set_cpuid() into pc_build_smbios()
pc: don't return cpu pointer from pc_new_cpu() as it's not needed
anymore
make possible_cpu_arch_ids() return const pointer
pc: move pcms->possible_cpus init out of pc_cpus_init()
pc: calculate topology only once when possible_cpus is initialised
pc: pass apic_id to pc_find_cpu_slot() directly so lookup could be
done without CPU object
pc: add writeonly 'cpu' property to PCMachine
numa: introduce '-numa cpu' cpu option
numa: replace cpu_index_to_socket_id() with
cpu_index_to_instance_props()
numa: use new machine.cpu property with -numa cpus=... CLI
pc: drop usage of legacy numa_get_node_for_cpu()
pc: cpu: make sure that cpu.node-id matches -numa mapping
include/hw/acpi/acpi_dev_interface.h | 2 +- include/hw/boards.h | 14 ++- include/hw/i386/pc.h | 2 +- include/qom/cpu.h | 2 - include/sysemu/numa.h | 3 +- target/arm/cpu.h | 2 + target/i386/cpu.h | 1 + target/ppc/cpu.h | 2 + hw/acpi/cpu.c | 13 +-- hw/acpi/cpu_hotplug.c | 4 +- hw/arm/virt.c | 12 +- hw/i386/acpi-build.c | 25 ++--- hw/i386/pc.c | 210 +++++++++++++++++++++++------------ hw/ppc/spapr.c | 15 ++- hw/ppc/spapr_cpu_core.c | 2 +- monitor.c | 7 +- numa.c | 89 +++++++++++---- qapi-schema.json | 3 +- stubs/pc_madt_cpu_entry.c | 2 +- target/arm/cpu.c | 1 + target/i386/cpu.c | 1 + target/ppc/translate_init.c | 1 + vl.c | 4 +- 23 files changed, 269 insertions(+), 148 deletions(-)
Signature · 1 line
2.7.4