Received: from eggs.gnu.org ([208.118.235.92]:45485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcdxD-0007zl-Q4 for qemu-devel@nongnu.org; Wed, 15 May 2013 11:49:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ucdx7-0000EI-Cj for qemu-devel@nongnu.org; Wed, 15 May 2013 11:49:23 -0400 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:51211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucdx7-0000Dg-3k for qemu-devel@nongnu.org; Wed, 15 May 2013 11:49:17 -0400 Received: by mail-we0-f174.google.com with SMTP id x53so1750218wes.5 for ; Wed, 15 May 2013 08:49:16 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 15 May 2013 17:48:45 +0200 Message-Id: <1368632937-32272-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [RFC PATCH 00/12] RCU implementation for QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka , qemulist@gmail.com, David Gibson Here is an RCU implementation based on liburcu. I had posted something like this a couple years ago, but there have been many changes: - more portable code - adjusted for all the threads that we have now - updated atomic operations for GCC 4.8 - lots of documentation There is plenty of documentation in the patches, so I'm not being too verbose here... Giving a shot to rcutorture on a weak memory-model machine (PPC) would be nice. It's available on my github repo as branch rcu. rcutorture works on Linux-x86. My WINE setup has some problem with glib right now. Paolo Paolo Bonzini (12): add a header file for atomic operations qemu-thread: add QemuEvent rcu: add rcu library qemu-thread: register threads with RCU rcu: add call_rcu rcu: add rcutorture rcu: allow nested calls to rcu_thread_offline/rcu_thread_online qemu-thread: report RCU quiescent states event loop: report RCU quiescent states cpus: report RCU quiescent states block: report RCU quiescent states migration: report RCU quiescent states aio-posix.c | 7 + aio-win32.c | 10 +- block/raw-posix.c | 3 + block/raw-win32.c | 3 + cpus.c | 3 + docs/atomics.txt | 322 ++++++++++++++++++++++++++++++++ docs/rcu.txt | 435 ++++++++++++++++++++++++++++++++++++++++++++ hw/9pfs/virtio-9p-synth.c | 1 + hw/display/qxl.c | 3 +- hw/virtio/vhost.c | 9 +- include/qemu/atomic.h | 223 +++++++++++++++++++---- include/qemu/queue.h | 13 ++ include/qemu/rcu-pointer.h | 110 +++++++++++ include/qemu/rcu.h | 207 +++++++++++++++++++++ include/qemu/thread-posix.h | 8 + include/qemu/thread-win32.h | 4 + include/qemu/thread.h | 10 +- kvm-all.c | 3 + libcacard/Makefile | 3 +- main-loop.c | 5 + migration.c | 5 +- tests/Makefile | 5 +- tests/rcutorture.c | 387 +++++++++++++++++++++++++++++++++++++++ tests/test-thread-pool.c | 8 +- util/Makefile.objs | 1 + util/qemu-thread-posix.c | 174 +++++++++++++++++- util/qemu-thread-win32.c | 44 ++++- util/rcu.c | 320 ++++++++++++++++++++++++++++++++ 28 files changed, 2270 insertions(+), 56 deletions(-) create mode 100644 docs/atomics.txt create mode 100644 docs/rcu.txt create mode 100644 include/qemu/rcu-pointer.h create mode 100644 include/qemu/rcu.h create mode 100644 tests/rcutorture.c create mode 100644 util/rcu.c -- 1.8.1.4