qemu-e2k/system
Fiona Ebner 03e471c41d qemu_init: increase NOFILE soft limit on POSIX
In many configurations, e.g. multiple vNICs with multiple queues or
with many Ceph OSDs, the default soft limit of 1024 is not enough.
QEMU is supposed to work fine with file descriptors >= 1024 and does
not use select() on POSIX. Bump the soft limit to the allowed hard
limit to avoid issues with the aforementioned configurations.

Of course the limit could be raised from the outside, but the man page
of systemd.exec states about 'LimitNOFILE=':

> Don't use.
> [...]
> Typically applications should increase their soft limit to the hard
> limit on their own, if they are OK with working with file
> descriptors above 1023,

If the soft limit is already the same as the hard limit, avoid the
superfluous setrlimit call. This can avoid a warning with a strict
seccomp filter blocking setrlimit if NOFILE was already raised before
executing QEMU.

Buglink: https://bugzilla.proxmox.com/show_bug.cgi?id=4507
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-02-09 12:47:58 +00:00
..
arch_init.c
async-teardown.c
balloon.c balloon: Fix a misleading error message 2023-11-17 10:07:52 +01:00
bootdevice.c
cpu-throttle.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
cpu-timers.c system/cpu-timers: Introduce ICountMode enumerator 2024-01-19 12:28:59 +01:00
cpus.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
datadir.c
device_tree.c
dirtylimit.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
dma-helpers.c scsi: assert that callbacks run in the correct AioContext 2023-12-21 22:49:27 +01:00
globals.c net: make nb_nics and nd_table[] static in net/net.c 2024-02-02 16:23:48 +00:00
ioport.c
main.c softmmu: pass the main loop status to gdb "Wxx" packet 2023-10-12 12:33:24 +10:00
memory_mapping.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
memory.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
meson.build configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
physmem.c target: Make qemu_target_page_mask() available for *-user 2024-01-29 21:04:10 +10:00
qdev-monitor.c Add virtio-sound-pci device 2023-11-07 03:39:10 -05:00
qemu-seccomp.c
qtest.c system/qtest: Include missing 'hw/core/cpu.h' header 2023-12-20 10:29:23 +01:00
rtc.c
runstate-action.c
runstate-hmp-cmds.c
runstate.c qapi: Remove deprecated 'singlestep' member of StatusInfo 2024-01-19 11:38:32 +01:00
tpm-hmp-cmds.c
tpm.c
trace-events
trace.h
vl.c qemu_init: increase NOFILE soft limit on POSIX 2024-02-09 12:47:58 +00:00
watchpoint.c system/watchpoint: Move TCG specific code to accel/tcg/ 2024-01-19 12:28:59 +01:00