diff options
author | Mark Kanda <mark.kanda@oracle.com> | 2024-01-31 10:53:27 -0600 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2024-02-06 08:15:22 +0100 |
commit | 04accf43df83aa10f06f7dbda3ecf0db97f0c5a6 (patch) | |
tree | c5668fe7f5ae98622af2f69ac4f2a97ff219a97a /util/oslib-win32.c | |
parent | 540a1abbf0b243e4cfb4333c5d30a041f7080ba4 (diff) |
oslib-posix: initialize backend memory objects in parallel
QEMU initializes preallocated backend memory as the objects are parsed from
the command line. This is not optimal in some cases (e.g. memory spanning
multiple NUMA nodes) because the memory objects are initialized in series.
Allow the initialization to occur in parallel (asynchronously). In order to
ensure optimal thread placement, asynchronous initialization requires prealloc
context threads to be in use.
Signed-off-by: Mark Kanda <mark.kanda@oracle.com>
Message-ID: <20240131165327.3154970-2-mark.kanda@oracle.com>
Tested-by: Mario Casquero <mcasquer@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'util/oslib-win32.c')
-rw-r--r-- | util/oslib-win32.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c index c4a5f05a49..b623830d62 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -265,7 +265,7 @@ int getpagesize(void) } bool qemu_prealloc_mem(int fd, char *area, size_t sz, int max_threads, - ThreadContext *tc, Error **errp) + ThreadContext *tc, bool async, Error **errp) { int i; size_t pagesize = qemu_real_host_page_size(); @@ -278,6 +278,12 @@ bool qemu_prealloc_mem(int fd, char *area, size_t sz, int max_threads, return true; } +bool qemu_finish_async_prealloc_mem(Error **errp) +{ + /* async prealloc not supported, there is nothing to finish */ + return true; +} + char *qemu_get_pid_name(pid_t pid) { /* XXX Implement me */ |