From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSxf-0004vE-IH for qemu-devel@nongnu.org; Tue, 08 Oct 2013 04:48:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTSxX-0003Zl-4Y for qemu-devel@nongnu.org; Tue, 08 Oct 2013 04:48:11 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:39048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSxW-0003ZY-Tu for qemu-devel@nongnu.org; Tue, 08 Oct 2013 04:48:03 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so3810413eek.4 for ; Tue, 08 Oct 2013 01:48:02 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 8 Oct 2013 10:47:30 +0200 Message-Id: <1381222058-16701-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/8] Make icount thread-safe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alex@alex.org.uk This series moves the icount state under the same seqlock as the "normal" vm_clock implementation. It is not yet 100% thread-safe, because the CPU list should be moved under RCU protection (due to the call to !all_cpu_threads_idle() in qemu_clock_warp). However it is a substantial step forward, the only uncovered case being CPU hotplug. Please review. Paolo Paolo Bonzini (8): timers: extract timer_mod_ns_locked and timerlist_rearm timers: add timer_mod_anticipate and timer_mod_anticipate_ns timers: use cpu_get_icount() directly timers: reorganize icount_warp_rt timers: prepare the code for future races in calling qemu_clock_warp timers: introduce cpu_get_clock_locked timers: document (future) locking rules for icount timers: make icount thread-safe cpus.c | 110 ++++++++++++++++++++++++++++++++++++------------- include/qemu/timer.h | 26 +++++++++ qemu-timer.c | 74 +++++++++++++++++++------ 4 files changed, 163 insertions(+), 47 deletions(-) create mode 100644 include/qemu/seqlock.h -- 1.8.3.1