]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rpc: switch virtlockd and virtlogd to use single-threaded dispatch
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 6 Mar 2018 17:12:20 +0000 (17:12 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 8 Mar 2018 15:40:29 +0000 (15:40 +0000)
commiteefabb38c34cb61edcb4a233ebc7c764547e515e
tree5a1b8c4a1c5e11a5cceb45c68b6a8916f3296a7d
parent86cae503a4404e068a11285564a0ee3862d1570c
rpc: switch virtlockd and virtlogd to use single-threaded dispatch

Currently both virtlogd and virtlockd use a single worker thread for
dispatching RPC messages. Even this is overkill and their RPC message
handling callbacks all run in short, finite time and so blocking the
main loop is not an issue like you'd see in libvirtd with long running
QEMU commands.

By setting max_workers==0, we can turn off the worker thread and run
these daemons single threaded. This in turn fixes a serious problem in
the virtlockd daemon whereby it loses all fcntl() locks at re-exec due
to multiple threads existing. fcntl() locks only get preserved if the
process is single threaded at time of exec().

Reviewed-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/locking/lock_daemon.c
src/logging/log_daemon.c