qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemulist@gmail.com, stefanha@redhat.com
Subject: [Qemu-devel] [RFC PATCH 0/3] Timer thread-safety improvements
Date: Thu, 29 Aug 2013 14:30:58 +0200	[thread overview]
Message-ID: <1377779462-24383-1-git-send-email-pbonzini@redhat.com> (raw)

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

             reply	other threads:[~2013-08-29 12:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 12:30 Paolo Bonzini [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377779462-24383-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemulist@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).