qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/3] Timer thread-safety improvements
@ 2013-08-29 12:30 Paolo Bonzini
  2013-08-29 12:30 ` [Qemu-devel] [RFC PATCH 1/3] qemu-timer: do del+mod atomically Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Paolo Bonzini @ 2013-08-29 12:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemulist, stefanha

These four patches go on top of Stefan's patch introducing a lock for
a timerlist's active timers.  Patches 1 and 2 fix bugs and probably
should simply be squashed into his patch.

Patch 3 is an optimization and code simplification.  It could even go
in _before_ introducing the lock, at Stefan's discretion.

Patch 4 (incomplete and not even compiled) is an optimization that avoids
taking the lock if timerlist_run_timers does not have any timer ready to
fire.  I'm posting it just to share the idea and will resend it with
more documentation later, once the RCU infrastructure is in.

Paolo Bonzini (4):
  qemu-timer: do del+mod atomically
  qemu-timer: fix race conditions on freeing the timer
  qemu-timer: do not take the lock in timer_pending
  qemu-timer: use RCU to preserve the timers during lockless lookup

 qemu-timer.c | 96 +++++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 62 insertions(+), 34 deletions(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2013-08-29 12:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 12:30 [Qemu-devel] [RFC PATCH 0/3] Timer thread-safety improvements Paolo Bonzini
2013-08-29 12:30 ` [Qemu-devel] [RFC PATCH 1/3] qemu-timer: do del+mod atomically Paolo Bonzini
2013-08-29 12:31 ` [Qemu-devel] [RFC PATCH 2/3] qemu-timer: fix race conditions on freeing the timer Paolo Bonzini
2013-08-29 12:31 ` [Qemu-devel] [RFC PATCH 3/3] qemu-timer: do not take the lock in timer_pending Paolo Bonzini
2013-08-29 12:31 ` [Qemu-devel] [RFC PATCH 4/3] qemu-timer: use RCU to preserve the timers during lockless lookup Paolo Bonzini

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).