qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH] [RFC] aio/timers: Drop alarm timers; introduce QEMUClock to AioContext; run timers in aio_poll
Date: Thu, 25 Jul 2013 11:00:43 +0200	[thread overview]
Message-ID: <20130725090043.GA21033@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1374254783-8077-1-git-send-email-alex@alex.org.uk>

On Fri, Jul 19, 2013 at 06:26:23PM +0100, Alex Bligh wrote:
> [ This is a patch for RFC purposes only. It is compile tested on Linux x86_64 only
> and passes make check (or rather did before make check started dying in the
> boot order test - different bug). I'd like to know whether I'm going in
> the right direction ]

Looks promising.

> We no longer need alarm timers to trigger QEMUTimer as we'll be polling
> them in aio_poll.
> 
> Remove static declaration from qemu_new_clock and introduce qemu_free_clock.
> 
> Maintain a list of QEMUClocks.
> 
> Introduce qemu_clock_deadline_ns and qemu_clock_deadine_all_ns which calculate how
> long aio_poll etc. should wait, plus (for the time being) a conversion to milliseconds.
> 
> Make qemu_run_timers return a bool to indicate progress.
> 
> Add QEMUClock to AioContext.
> 
> Run timers attached to clock in aio_poll

Too many logical changes for a single patch :).  Please split this into
a series.

> @@ -52,6 +44,8 @@ struct QEMUClock {
>  
>      int type;
>      bool enabled;
> +
> +    QLIST_ENTRY(QEMUClock) list;

Please avoid global state.  AioContext should be usable from multiple
threads, this list would require synchronization.

main-loop.c should call functions to run timers and calculate the
nearest deadline on vm_clock/host_clock/rt_clock.  It knows about them,
they are defined in <qemu/timer.h>.

That way no list is needed.

  reply	other threads:[~2013-07-25  9:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-06 16:24 [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves Alex Bligh
2013-07-06 16:31 ` Alex Bligh
2013-07-06 18:04   ` [Qemu-devel] [PATCHv2] " Alex Bligh
2013-07-15 14:25 ` [Qemu-devel] [PATCH] " Paolo Bonzini
2013-07-15 20:15   ` Alex Bligh
2013-07-15 20:53     ` Paolo Bonzini
2013-07-15 23:04       ` Alex Bligh
2013-07-16  6:16         ` Paolo Bonzini
2013-07-16  7:30           ` Alex Bligh
2013-07-16  7:34             ` Paolo Bonzini
2013-07-16 15:29               ` Alex Bligh
2013-07-16 15:43                 ` Paolo Bonzini
2013-07-16 16:14                   ` Alex Bligh
2013-07-16 16:55                     ` Paolo Bonzini
2013-07-16 21:22                       ` [Qemu-devel] [PATCHv3] " Alex Bligh
2013-07-16 21:24                       ` [Qemu-devel] [PATCH] " Alex Bligh
2013-07-17  3:02                         ` Stefan Hajnoczi
2013-07-17  8:07                           ` Alex Bligh
2013-07-17  8:11                             ` Paolo Bonzini
2013-07-17 16:09                               ` Alex Bligh
2013-07-18 18:48                           ` Alex Bligh
2013-07-19  1:58                             ` Stefan Hajnoczi
2013-07-19  6:22                               ` Paolo Bonzini
2013-07-19  6:38                               ` Alex Bligh
2013-07-19  6:51                                 ` Paolo Bonzini
2013-07-19 17:26                                   ` [Qemu-devel] [PATCH] [RFC] aio/timers: Drop alarm timers; introduce QEMUClock to AioContext; run timers in aio_poll Alex Bligh
2013-07-25  9:00                                     ` Stefan Hajnoczi [this message]
2013-07-25  9:02                                     ` Stefan Hajnoczi
2013-07-17  7:50                       ` [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves Kevin Wolf

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=20130725090043.GA21033@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=alex@alex.org.uk \
    --cc=aliguori@us.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --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).