]> git.proxmox.com Git - mirror_qemu.git/commit
rcu: add rcu library
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 13 May 2013 11:29:47 +0000 (13:29 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Feb 2015 15:55:10 +0000 (16:55 +0100)
commit7911747bd46123ef8d8eef2ee49422bb8a4b274f
treec8411ff290dac6102131bef4c719dfd077381693
parent158ef8cbb7e0fe8bb430310924b8bebe5f186e6e
rcu: add rcu library

This includes a (mangled) copy of the liburcu code.  The main changes
are: 1) removing dependencies on many other header files in liburcu; 2)
removing for simplicity the tentative busy waiting in synchronize_rcu,
which has limited performance effects; 3) replacing futexes in
synchronize_rcu with QemuEvents for Win32 portability.  The API is
the same as liburcu, so it should be possible in the future to require
liburcu on POSIX systems for example and use our copy only on Windows.

Among the various versions available I chose urcu-mb, which is the
least invasive implementation even though it does not have the
fastest rcu_read_{lock,unlock} implementation.  The urcu flavor can
be changed later, after benchmarking.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
docs/rcu.txt [new file with mode: 0644]
hw/9pfs/virtio-9p-synth.c
include/qemu/atomic.h
include/qemu/queue.h
include/qemu/rcu.h [new file with mode: 0644]
include/qemu/thread.h
util/Makefile.objs
util/rcu.c [new file with mode: 0644]