qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Initialize backend memory objects in parallel
@ 2024-01-31 13:48 Mark Kanda
  2024-01-31 13:48 ` [PATCH v3 1/1] oslib-posix: initialize " Mark Kanda
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Kanda @ 2024-01-31 13:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: david, pbonzini, mark.kanda, berrange

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/c15161eb-f52c-4a82-8b4b-0ba03842188c@redhat.com/

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     |   8 ++-
 hw/virtio/virtio-mem.c |   4 +-
 include/qemu/osdep.h   |  18 +++++-
 system/vl.c            |   8 +++
 util/oslib-posix.c     | 131 +++++++++++++++++++++++++++++++----------
 util/oslib-win32.c     |   8 ++-
 6 files changed, 140 insertions(+), 37 deletions(-)

-- 
2.39.3



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

end of thread, other threads:[~2024-01-31 15:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-31 13:48 [PATCH v3 0/1] Initialize backend memory objects in parallel Mark Kanda
2024-01-31 13:48 ` [PATCH v3 1/1] oslib-posix: initialize " Mark Kanda
2024-01-31 14:04   ` David Hildenbrand
2024-01-31 14:27     ` Mark Kanda
2024-01-31 14:30       ` David Hildenbrand
2024-01-31 14:48         ` Mark Kanda
2024-01-31 14:57           ` David Hildenbrand
2024-01-31 15:02             ` Mark Kanda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).