qemu-e2k/backends
Jaroslav Jindrak f8d426a685 hostmem: default the amount of prealloc-threads to smp-cpus
Prior to the introduction of the prealloc-threads property, the amount
of threads used to preallocate memory was derived from the value of
smp-cpus passed to qemu, the amount of physical cpus of the host
and a hardcoded maximum value. When the prealloc-threads property
was introduced, it included a default of 1 in backends/hostmem.c and
a default of smp-cpus using the sugar API for the property itself. The
latter default is not used when the property is not specified on qemu's
command line, so guests that were not adjusted for this change suddenly
started to use the default of 1 thread to preallocate memory, which
resulted in observable slowdowns in guest boots for guests with large
memory (e.g. when using libvirt <8.2.0 or managing guests manually).

This commit restores the original behavior for these cases while not
impacting guests started with the prealloc-threads property in any way.

Fixes: 220c1fd864e9d ("hostmem: introduce "prealloc-threads" property")
Signed-off-by: Jaroslav Jindrak <dzejrou@gmail.com>
Message-Id: <20220517123858.7933-1-dzejrou@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-23 10:56:01 +02:00
..
tpm Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
confidential-guest-support.c
cryptodev-builtin.c
cryptodev-vhost-user.c
cryptodev-vhost.c vhost: Add Error parameter to vhost_dev_init() 2021-06-30 13:15:44 +02:00
cryptodev.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
dbus-vmstate1.xml docs: move D-Bus VMState documentation to source XML 2021-12-21 10:50:21 +04:00
dbus-vmstate.c
hostmem-epc.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
hostmem-file.c include: Move qemu_madvise() and related #defines to new qemu/madvise.h 2022-02-21 13:30:20 +00:00
hostmem-memfd.c
hostmem-ram.c
hostmem.c hostmem: default the amount of prealloc-threads to smp-cpus 2022-05-23 10:56:01 +02:00
Kconfig
meson.build meson: use have_vhost_* variables to pick sources 2022-05-07 07:46:58 +02:00
rng-builtin.c
rng-egd.c
rng-random.c
rng.c rng: make opened property read-only 2022-05-14 12:33:44 +02:00
trace-events
trace.h
vhost-user.c vhost: Add Error parameter to vhost_dev_init() 2021-06-30 13:15:44 +02:00