Skip to content

Initialize backend memory objects in parallel

Mark Kanda qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 4 repliesIn review
  2. v31 patch 6 repliesSuperseded
  3. v22 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches8 repliesSuperseded

Changes in v4 from the cover letter

- remove unneeded async check from host_memory_backend_set_prealloc()
- rename qemu_finish_async_mem_prealloc -> qemu_finish_async_prealloc_mem
- use new phase PHASE_LATE_BACKENDS_CREATED for async

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1oslib-posix: initialize backend memory objects in parallelbackends/hostmem.c hw/virtio/virtio-mem.c include/hw/qdev-core.h +4 more+145 -374 replies

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by.

PatchMario Casquero
1/1T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/1] Initialize backend memory objects in parallel

v4:
- remove unneeded async check from host_memory_backend_set_prealloc()
- rename qemu_finish_async_mem_prealloc -> qemu_finish_async_prealloc_mem
- use new phase PHASE_LATE_BACKENDS_CREATED for async

v3:
- squash into a single patch
- use global context list for async handling only (MT capability)
- add BQL asserts to guard against concurrent async prealloc requests
- clean up qemu_finish_async_mem_prealloc() error handling

Includes David's suggested restructuring [1] (with David's SoB).

[1] https://lore.kernel.org/qemu-devel/[email protected]/

v2:
- require MADV_POPULATE_WRITE (simplify the implementation)
- require prealloc context threads to ensure optimal thread placement
- use machine phase 'initialized' to determine when to allow parallel init

QEMU initializes preallocated backend memory when parsing the corresponding objects from the command line. In certain scenarios, such as memory being preallocated across multiple numa nodes, this approach is not optimal due to the unnecessary serialization.

This series addresses this issue by initializing the backend memory objects in parallel.

Mark Kanda (1):
oslib-posix: initialize backend memory objects in parallel

 backends/hostmem.c     |   7 ++-
 hw/virtio/virtio-mem.c |   4 +-
 include/hw/qdev-core.h |   5 ++
 include/qemu/osdep.h   |  18 +++++-
 system/vl.c            |   9 +++
 util/oslib-posix.c     | 131 +++++++++++++++++++++++++++++++----------
 util/oslib-win32.c     |   8 ++-
 7 files changed, 145 insertions(+), 37 deletions(-)
Signature · 1 line
2.39.3