[ovs-dev] [worker 00/12] Implement "worker process" to avoid blocking flow setup
Ben Pfaff
blp at nicira.com
Wed May 23 00:19:03 UTC 2012
ovs-vswitchd occasionally needs to do some activities that may block
in the kernel unavoidably. This patch series changes ovs-vswitchd to
do these activities in a separate "worker process".
Ben Pfaff (12):
socket-util: Remove 'passcred' parameter from make_unix_socket().
socket-util: New function xset_nonblocking().
socket-util: Add functions for sending fds over Unix domain sockets.
util: Introduce "subprogram_name" to identify subprocesses and
threads.
daemon: Factor out code into new function
fork_and_wait_for_startup().
daemon: Factor out code into new function daemonize_post_detach().
vlog: Add VLOG_ABORT() to log and call abort().
worker: New library for breaking a daemon into multiple processes.
vlog: Use system calls instead of stdio to write log files.
vlog: Use worker process to write to log file.
shash: New functions smap_from_json(), smap_to_json().
system-stats: Run as part of worker process.
NEWS | 4 +-
include/sparse/sys/socket.h | 31 +++
lib/automake.mk | 4 +-
lib/daemon.c | 69 +++++--
lib/daemon.h | 3 +
lib/fatal-signal.c | 4 +-
lib/process.c | 6 +-
lib/shash.c | 39 ++++-
lib/shash.h | 6 +-
lib/signals.c | 6 +-
lib/socket-util.c | 278 +++++++++++++++++++++++++--
lib/socket-util.h | 30 +++-
lib/stream-unix.c | 4 +-
lib/util.c | 23 ++-
lib/util.h | 3 +
lib/vlog.c | 128 +++++++++++--
lib/vlog.h | 16 +-
lib/worker.c | 447 +++++++++++++++++++++++++++++++++++++++++++
lib/worker.h | 68 +++++++
tests/test-unix-socket.c | 6 +-
utilities/ovs-appctl.8.in | 10 +
vswitchd/bridge.c | 59 ++++--
vswitchd/ovs-vswitchd.c | 5 +
vswitchd/system-stats.c | 165 +++++++++++++++-
vswitchd/system-stats.h | 8 +-
25 files changed, 1326 insertions(+), 96 deletions(-)
create mode 100644 lib/worker.c
create mode 100644 lib/worker.h
--
1.7.2.5
More information about the dev
mailing list