diff options
| author | Igor Mammedov | 2020-02-19 17:09:50 +0100 |
|---|---|---|
| committer | Patchew Importer | 2020-02-19 17:50:02 +0100 |
| commit | ffac16fab33bb42f17e47624985220c1fd864e9d (patch) | |
| tree | bdf0d5089bbfed0c3f042c6c7af9d0afdf4a5e90 /include | |
| parent | make mem_path local variable (diff) | |
| download | qemu-ffac16fab33bb42f17e47624985220c1fd864e9d.tar.gz qemu-ffac16fab33bb42f17e47624985220c1fd864e9d.tar.xz qemu-ffac16fab33bb42f17e47624985220c1fd864e9d.zip | |
hostmem: introduce "prealloc-threads" property
the property will allow user to specify number of threads to use
in pre-allocation stage. It also will allow to reduce implicit
hostmem dependency on current_machine.
On object creation it will default to 1, but via machine
compat property it will be updated to MachineState::smp::cpus
to keep current behavior for hostmem and main RAM (which is
now also hostmem based).
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200219160953.13771-77-imammedo@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sysemu/hostmem.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index 5db0d668ec..bdf86665ab 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -61,6 +61,7 @@ struct HostMemoryBackendClass { * @parent: opaque parent object container * @size: amount of memory backend provides * @mr: MemoryRegion representing host memory belonging to backend + * @prealloc_threads: number of threads to be used for preallocatining RAM */ struct HostMemoryBackend { /* private */ @@ -70,6 +71,7 @@ struct HostMemoryBackend { uint64_t size; bool merge, dump, use_canonical_path; bool prealloc, force_prealloc, is_mapped, share; + uint32_t prealloc_threads; DECLARE_BITMAP(host_nodes, MAX_NODES + 1); HostMemPolicy policy; |
