[libvirt] [PATCH 5/5] rpc: switch virtlockd and virtlogd to use single-threaded dispatch

John Ferlan jferlan at redhat.com
Wed Mar 7 23:50:25 UTC 2018



On 03/06/2018 12:58 PM, Daniel P. Berrangé wrote:
> 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 looses all fcntl() locks at re-exec due

s/looses/loses

> to multiple threads existing. fcntl() locks only get preserved if the
> process is single threaded at time of exec().
> 
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>  src/locking/lock_daemon.c | 4 ++--
>  src/logging/log_daemon.c  | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan at redhat.com>

John




More information about the libvir-list mailing list