qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe
@ 2013-09-12  9:02 Stefan Hajnoczi
  2013-09-12  9:02 ` [Qemu-devel] [PATCH v4 1/3] qemu-timer: drop outdated signal safety comments Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2013-09-12  9:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Ping Fan Liu, Stefan Hajnoczi, alex,
	Anthony Liguori

v4:
 * Rebased & retested for easy review and merge
 * No code changes

v3:
 * Squashed Paolo's fixes and added his patch to avoid locking in timer_pending()

v2:
 * Rebased onto qemu.git/master following the merge of Alex's AioContext timers

The purpose of these patches is to eventually allow device models to set and
cancel timers without holding the global mutex.  When the device model runs in
a vcpu thread and the iothread processes timers, the
QEMUTimerList->active_timers must be protected from concurrent access.

Patch 1 is a clean-up.

Patch 2 is the entire change needed to protect ->active_timers.

Patch 3 makes timer_pending() run without a lock.

Paolo Bonzini (1):
  qemu-timer: do not take the lock in timer_pending

Stefan Hajnoczi (2):
  qemu-timer: drop outdated signal safety comments
  qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

 include/qemu/timer.h | 17 ++++++++++
 qemu-timer.c         | 92 ++++++++++++++++++++++++++++++++++++----------------
 2 files changed, 81 insertions(+), 28 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-10-07 16:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12  9:02 [Qemu-devel] [PATCH v4 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe Stefan Hajnoczi
2013-09-12  9:02 ` [Qemu-devel] [PATCH v4 1/3] qemu-timer: drop outdated signal safety comments Stefan Hajnoczi
2013-09-12  9:02 ` [Qemu-devel] [PATCH v4 2/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe Stefan Hajnoczi
2013-09-30 12:45   ` Mike Day
2013-09-30 12:55     ` Alex Bligh
2013-09-30 13:18       ` Mike Day
2013-09-30 13:34         ` Alex Bligh
2013-09-30 14:31           ` Mike Day
2013-10-07 12:20           ` Paolo Bonzini
2013-10-07 16:14             ` Mike Day
2013-09-12  9:02 ` [Qemu-devel] [PATCH v4 3/3] qemu-timer: do not take the lock in timer_pending Stefan Hajnoczi
2013-09-18 13:51 ` [Qemu-devel] [PATCH v4 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).