diff options
author | David Hildenbrand <david@redhat.com> | 2022-10-14 15:47:19 +0200 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2022-10-27 11:01:03 +0200 |
commit | e6816458624813de4a31f89096a620b410e1c2b8 (patch) | |
tree | 327eb49230110c949e5443ebae4d1fd64336acf8 /qapi | |
parent | e04a34e55cf1911099e2d8a680f9bee4f6d90e4a (diff) |
hostmem: Allow for specifying a ThreadContext for preallocation
Let's allow for specifying a thread context via the "prealloc-context"
property. When set, preallcoation threads will be crated via the
thread context -- inheriting the same CPU affinity as the thread
context.
Pinning preallcoation threads to CPUs can heavily increase performance
in NUMA setups, because, preallocation from a CPU close to the target
NUMA node(s) is faster then preallocation from a CPU further remote,
simply because of memory bandwidth for initializing memory with zeroes.
This is especially relevant for very large VMs backed by huge/gigantic
pages, whereby preallocation is mandatory.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <20221014134720.168738-7-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/qom.json | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qapi/qom.json b/qapi/qom.json index 20b5735d78..87fcad2423 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -578,6 +578,9 @@ # # @prealloc-threads: number of CPU threads to use for prealloc (default: 1) # +# @prealloc-context: thread context to use for creation of preallocation threads +# (default: none) (since 7.2) +# # @share: if false, the memory is private to QEMU; if true, it is shared # (default: false) # @@ -608,6 +611,7 @@ '*policy': 'HostMemPolicy', '*prealloc': 'bool', '*prealloc-threads': 'uint32', + '*prealloc-context': 'str', '*share': 'bool', '*reserve': 'bool', 'size': 'size', |