All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option
@ 2017-01-18 17:13 Igor Mammedov
  2017-01-18 17:13 ` [Qemu-devel] [RFC 01/13] numa: access CPU's node id via property in hmp_info_numa() Igor Mammedov
                   ` (14 more replies)
  0 siblings, 15 replies; 37+ messages in thread
From: Igor Mammedov @ 2017-01-18 17:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Dou Liyang, fanc.fnst, caoj.fnst, stefanha, izumi.taku, vilanova,
	ehabkost, peter.maydell, Andrew Jones, David Gibson, Thomas Huth


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.

CC: Dou Liyang <douly.fnst@cn.fujitsu.com>
CC: fanc.fnst@cn.fujitsu.com
CC: caoj.fnst@cn.fujitsu.com
CC: stefanha@redhat.com
CC: izumi.taku@jp.fujitsu.com
CC: vilanova@ac.upc.edu
CC: ehabkost@redhat.com
CC: peter.maydell@linaro.org
CC: Andrew Jones <drjones@redhat.com>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Thomas Huth <thuth@redhat.com>

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

-- 
2.7.4

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2017-01-24 10:07 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 17:13 [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 01/13] numa: access CPU's node id via property in hmp_info_numa() Igor Mammedov
2017-01-18 18:18   ` Eduardo Habkost
2017-01-19 14:41     ` Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 02/13] pc: cleanup: move smbios_set_cpuid() into pc_build_smbios() Igor Mammedov
2017-01-20 19:01   ` Eduardo Habkost
2017-01-18 17:13 ` [Qemu-devel] [RFC 03/13] pc: don't return cpu pointer from pc_new_cpu() as it's not needed anymore Igor Mammedov
2017-01-20 19:02   ` Eduardo Habkost
2017-01-18 17:13 ` [Qemu-devel] [RFC 04/13] make possible_cpu_arch_ids() return const pointer Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 05/13] pc: move pcms->possible_cpus init out of pc_cpus_init() Igor Mammedov
2017-01-20  3:31   ` Dou Liyang
2017-01-20 15:33     ` Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 06/13] pc: calculate topology only once when possible_cpus is initialised Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 07/13] pc: pass apic_id to pc_find_cpu_slot() directly so lookup could be done without CPU object Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 08/13] pc: add writeonly 'cpu' property to PCMachine Igor Mammedov
2017-01-18 18:27   ` Eduardo Habkost
2017-01-19 14:45     ` Igor Mammedov
2017-01-18 18:57   ` Eduardo Habkost
2017-01-19 15:04     ` Igor Mammedov
2017-01-23  6:50       ` Bharata B Rao
2017-01-23 15:03         ` Eduardo Habkost
2017-01-24 10:07           ` Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 09/13] numa: introduce '-numa cpu' cpu option Igor Mammedov
2017-01-18 18:22   ` Eric Blake
2017-01-19 15:09     ` Igor Mammedov
2017-01-20 13:40   ` Paolo Bonzini
2017-01-20 15:33     ` Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 10/13] numa: replace cpu_index_to_socket_id() with cpu_index_to_instance_props() Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 11/13] numa: use new machine.cpu property with -numa cpus=... CLI Igor Mammedov
2017-01-18 18:46   ` Eduardo Habkost
2017-01-19 14:36     ` Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 12/13] pc: drop usage of legacy numa_get_node_for_cpu() Igor Mammedov
2017-01-18 17:13 ` [Qemu-devel] [RFC 13/13] pc: cpu: make sure that cpu.node-id matches -numa mapping Igor Mammedov
2017-01-19  9:45 ` [Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option Daniel P. Berrange
2017-01-19 10:55   ` Eduardo Habkost
2017-01-19 14:09   ` Igor Mammedov
2017-01-20 15:37 ` Igor Mammedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.