qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Ping Fan Liu <pingfank@linux.vnet.ibm.com>,
	liu ping fan <qemulist@gmail.com>, Alex Bligh <alex@alex.org.uk>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe
Date: Mon, 19 Aug 2013 14:15:00 +0200	[thread overview]
Message-ID: <52120C44.6040305@redhat.com> (raw)
In-Reply-To: <20130815120053.GA30514@stefanha-thinkpad.redhat.com>

Il 15/08/2013 14:00, Stefan Hajnoczi ha scritto:
> The common case is that we only check the first timer in
> ->active_timers.  Usually the first timer has not expired yet and we
> return; the lock was taken once only.
> 
> I'm not sure it's worth complicating the case where we iterate multiple
> times.

I agree.  Later we may try to get creative and optimize the lookup of
the first timer (take the lock zero times instead of once if the first
timer has not expired yet, take the lock once instead of twice if one
timer runs, etc.).  Anything beyond that would be premature.

Paolo

  reply	other threads:[~2013-08-19 12:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 12:49 [Qemu-devel] [PATCH 0/2] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe Stefan Hajnoczi
2013-08-12 12:49 ` [Qemu-devel] [PATCH 1/2] qemu-timer: drop outdated signal safety comments Stefan Hajnoczi
2013-08-12 13:15   ` Alex Bligh
2013-08-12 12:49 ` [Qemu-devel] [PATCH 2/2] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe Stefan Hajnoczi
2013-08-12 13:19   ` Alex Bligh
2013-08-15  0:05   ` liu ping fan
2013-08-15  8:01     ` Stefan Hajnoczi
2013-08-15  8:22       ` liu ping fan
2013-08-15  8:24         ` liu ping fan
2013-08-15 12:00           ` Stefan Hajnoczi
2013-08-19 12:15             ` Paolo Bonzini [this message]
2013-08-15  8:43         ` Alex Bligh
2013-08-19 12:12   ` Paolo Bonzini
2013-08-12 20:31 ` [Qemu-devel] [PATCH 0/2] " Benoît Canet
2013-08-12 21:20   ` Alex Bligh

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=52120C44.6040305@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex@alex.org.uk \
    --cc=pingfank@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemulist@gmail.com \
    --cc=stefanha@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).