qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Ping Fan Liu <pingfank@linux.vnet.ibm.com>,
	Alex Bligh <alex@alex.org.uk>
Subject: [Qemu-devel] [PATCH v3 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe
Date: Thu, 29 Aug 2013 16:42:46 +0200	[thread overview]
Message-ID: <1377787369-26669-1-git-send-email-stefanha@redhat.com> (raw)

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

             reply	other threads:[~2013-08-29 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 14:42 Stefan Hajnoczi [this message]
2013-08-29 14:42 ` [Qemu-devel] [PATCH v3 1/3] qemu-timer: drop outdated signal safety comments Stefan Hajnoczi
2013-08-29 14:42 ` [Qemu-devel] [PATCH v3 2/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe Stefan Hajnoczi
2013-08-29 14:42 ` [Qemu-devel] [PATCH v3 3/3] qemu-timer: do not take the lock in timer_pending Stefan Hajnoczi
2013-09-12  3:10 ` [Qemu-devel] [PATCH v3 0/3] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe liu ping fan
2013-09-12  8:17   ` Stefan Hajnoczi
2013-09-12  8:21     ` liu ping fan

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=1377787369-26669-1-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=alex@alex.org.uk \
    --cc=pbonzini@redhat.com \
    --cc=pingfank@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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).