[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/2] rcu: support fork
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 0/2] rcu: support fork |
Date: |
Fri, 6 Mar 2015 10:22:13 +0100 |
Supporting fork in multithreaded programs is somewhat complicated,
however in QEMU we fork in two places (daemonize and smbd) and none of
them are complicated:
- daemonize happens before threads and mutexes proliferate unpredictably;
only the RCU state has to be reset and the call_rcu thread recreated
- smbd mostly does an exec in the child.
Unfortunately, glibc also makes forking terminally incompatible with
PTHREAD_MUTEX_ERRORCHECK, so you also need to disable that.
Paolo
Paolo Bonzini (2):
qemu-thread: do not use PTHREAD_MUTEX_ERRORCHECK
rcu: handle forks safely
util/qemu-thread-posix.c | 6 +-----
util/rcu.c | 34 +++++++++++++++++++++++++++++++++-
2 files changed, 34 insertions(+), 6 deletions(-)
--
2.3.0
- [Qemu-devel] [PATCH 0/2] rcu: support fork,
Paolo Bonzini <=