Skip to content

Current state of NUMA series, and hostmem improvements

Paolo Bonzini qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest28 patches 41 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/28NUMA: move numa related code to new file numa.cMakefile.target cpus.c include/exec/cpu-all.h +5 more+193 -1560 replies
2/28NUMA: check if the total numa memory size is equal to ram_sizenuma.c+11 -02 replies
3/28NUMA: Add numa_info structure to contain numa nodes infohw/i386/pc.c hw/ppc/spapr.c include/sysemu/sysemu.h +3 more+35 -270 replies
4/28NUMA: convert -numa option to use OptsVisitorinclude/sysemu/sysemu.h numa.c qapi-schema.json +1 more+114 -770 replies
5/28NUMA: expand MAX_NODES from 64 to 128include/sysemu/sysemu.h+1 -10 replies
6/28man: improve -numa docqemu-options.hx+7 -31 reply
7/28qemu-option: introduce qemu_find_opts_singletoninclude/qemu/config-file.h util/qemu-config.c vl.c+17 -103 replies
8/28vl: convert -m to QemuOptsqemu-options.hx vl.c+63 -163 replies
9/28vl: redo -object parsingvl.c+35 -522 replies
10/28qmp: allow object-add completion handler to get canonical pathqmp.c+5 -30 replies
11/28qmp: improve error reporting for -object and object-addqmp.c+4 -32 replies
12/28pc: pass QEMUMachineInitArgs to pc_memory_inithw/i386/pc.c hw/i386/pc_piix.c hw/i386/pc_q35.c +1 more+12 -181 reply
13/28numa: introduce memory_region_allocate_system_memoryhw/i386/pc.c include/hw/boards.h include/sysemu/sysemu.h +1 more+17 -31 reply
14/28add memdev backend infrastructurebackends/Makefile.objs backends/hostmem-ram.c backends/hostmem.c +1 more+224 -01 reply
15/28numa: add -numa node, memdev= optioninclude/sysemu/sysemu.h numa.c qapi-schema.json +1 more+77 -73 replies
16/28memory: reorganize file-based allocationexec.c include/exec/cpu-all.h include/exec/ram_addr.h +2 more+73 -463 replies
17/28memory: move mem_path handling to memory_region_allocate_system_memoryexec.c include/exec/memory.h memory.c +1 more+46 -143 replies
18/28memory: add error propagation to file-based RAM allocationexec.c include/exec/memory.h include/exec/ram_addr.h +2 more+40 -170 replies
19/28memory: move preallocation code out of exec.cexec.c include/qemu/osdep.h util/oslib-posix.c+76 -430 replies
20/28memory: move RAM_PREALLOC_MASK to exec.c, renameexec.c include/exec/cpu-all.h+6 -60 replies
21/28hostmem: add file-based HostMemoryBackendbackends/Makefile.objs backends/hostmem-file.c+109 -03 replies
22/28hostmem: separate allocation from UserCreatable complete methodbackends/hostmem-file.c backends/hostmem-ram.c backends/hostmem.c +1 more+19 -121 reply
23/28hostmem: add merge and dump propertiesbackends/hostmem.c include/qemu/osdep.h include/sysemu/hostmem.h+93 -10 replies
24/28hostmem: allow preallocation of any memory regionbackends/hostmem-file.c backends/hostmem.c exec.c +4 more+73 -00 replies
25/28hostmem: add property to map memory with MAP_SHAREDbackends/hostmem-file.c exec.c include/exec/memory.h +3 more+40 -120 replies
26/28configure: add Linux libnuma detectionconfigure+33 -00 replies
27/28hostmem: add properties for NUMA memory policybackends/hostmem.c include/sysemu/hostmem.h qapi-schema.json+132 -10 replies
28/28qmp: add query-memdevnuma.c qapi-schema.json qmp-commands.hx+127 -05 replies

Reviews trailers per patch

9 of 28 patches have a Reviewed-by or Acked-by.

PatchEduardo HabkostLaszlo ErsekEric BlakeAndreas FärberHu Tao
1/28R-b
2/28R-b
3/28R-b
4/28T-b R-b
5/28R-b
6/28R-b
7/28R-b R-b R-b R-b
8/28R-b
9/28
10/28
11/28
12/28R-b
13/28
14/28
15/28
16/28
17/28
18/28
19/28
20/28
21/28
22/28
23/28
24/28
25/28
26/28
27/28
28/28

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 2.1 00/28] Current state of NUMA series, and hostmem improvements

This series includes all the pending work on QOMifying the memory backends. Some of the patches posted so far didn't correctly build all targets, so I'm posting it as the basis for further work (including memory hotplug!). It's available at branch numa on my github repository.

To recap, the idea is to delegate all properties of the memory backend to a new QOM class hierarchy, in which the concrete classes are hostmem-ram and hostmem-file. The backend is passed to the machine via "-numa node,memdev=foo" where "foo" is the id of the backend object.

Patches 1-6: generic numa improvements
Patches 7-8: convert -m to QemuOpts, from the memory hotplug series Patches 9-11: improvements to object-add and -object
Patches 12-15: infrastructure for QOM memory backends
Patches 16-20: preparation for replacing -mem-path with a QOM backend Patches 21-24: new-style replacement for -mem-path, -mem-prealloc and madvise Patch 25: support for MAP_SHARED (requested by vhost-user) Patches 26-28: rest of Wanlong Gao and Hu Tao's NUMA policy work

New patches are patch 9, patch 11, patches 16-25. Please review them.

Missing, needed before merge:
1. conversion to memory_region_allocate_system_memory of all boards
2. more documentation

Missing, nice to have:
1. improvements to string visitors for ranges
2. HMP "info memdev" command

If anyone wants to pick up management of this series from now on, just shout.

Paolo

Hu Tao (2):
hostmem: add properties for NUMA memory policy
qmp: add query-memdev

Igor Mammedov (3):
vl: convert -m to QemuOpts
qmp: allow object-add completion handler to get canonical path add memdev backend infrastructure

Luiz Capitulino (1):
man: improve -numa doc

Paolo Bonzini (16):
qemu-option: introduce qemu_find_opts_singleton
vl: redo -object parsing
qmp: improve error reporting for -object and object-add
pc: pass QEMUMachineInitArgs to pc_memory_init
numa: introduce memory_region_allocate_system_memory
numa: add -numa node,memdev= option
memory: reorganize file-based allocation
memory: move mem_path handling to memory_region_allocate_system_memory
memory: add error propagation to file-based RAM allocation
memory: move preallocation code out of exec.c
memory: move RAM_PREALLOC_MASK to exec.c, rename
hostmem: add file-based HostMemoryBackend
hostmem: separate allocation from UserCreatable complete method
hostmem: add merge and dump properties
hostmem: allow preallocation of any memory region
hostmem: add property to map memory with MAP_SHARED

Wanlong Gao (6):
NUMA: move numa related code to new file numa.c
NUMA: check if the total numa memory size is equal to ram_size
NUMA: Add numa_info structure to contain numa nodes info
NUMA: convert -numa option to use OptsVisitor
NUMA: expand MAX_NODES from 64 to 128
configure: add Linux libnuma detection

 Makefile.target            |   2 +-
 backends/Makefile.objs     |   3 +
 backends/hostmem-file.c    | 134 +++++++++++++++++
 backends/hostmem-ram.c     |  50 +++++++
 backends/hostmem.c         | 346 ++++++++++++++++++++++++++++++++++++++++++++
 configure                  |  33 +++++
 cpus.c                     |  14 --
 exec.c                     | 206 +++++++++++++--------------
 hw/i386/pc.c               |  27 ++--
 hw/i386/pc_piix.c          |   8 +-
 hw/i386/pc_q35.c           |   4 +-
 hw/ppc/spapr.c             |  10 +-
 include/exec/cpu-all.h     |   8 --
 include/exec/cpu-common.h  |   2 +
 include/exec/memory.h      |  33 +++++
 include/exec/ram_addr.h    |   3 +
 include/hw/boards.h        |   4 +
 include/hw/i386/pc.h       |   7 +-
 include/qemu/config-file.h |   2 +
 include/qemu/osdep.h       |  12 ++
 include/sysemu/cpus.h      |   1 -
 include/sysemu/hostmem.h   |  68 +++++++++
 include/sysemu/sysemu.h    |  18 ++-
 memory.c                   |  29 ++++
 monitor.c                  |   2 +-
 numa.c                     | 347 +++++++++++++++++++++++++++++++++++++++++++++
 qapi-schema.json           |  89 ++++++++++++
 qemu-options.hx            |  25 +++-
 qmp-commands.hx            |  32 +++++
 qmp.c                      |  15 +-
 util/oslib-posix.c         |  73 ++++++++++
 util/qemu-config.c         |  14 ++
 vl.c                       | 323 ++++++++++++++---------------------------
 33 files changed, 1549 insertions(+), 395 deletions(-)
 create mode 100644 backends/hostmem-file.c
 create mode 100644 backends/hostmem-ram.c
 create mode 100644 backends/hostmem.c
 create mode 100644 include/sysemu/hostmem.h
 create mode 100644 numa.c
Signature · 1 line
1.8.5.3