Paolo,

--On 17 July 2013 10:11:07 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote:

The steps to achieving this:

1. Drop alarm timers from qemu-timer.c and calculate g_poll() timeout
   instead for the main loop.

2. Introduce a per-AioContext aio_ctx_clock that can be used with
   qemu_new_timer() to create a QEMUTimer that expires during
   aio_poll().

3. Calculate g_poll() timeout for aio_ctx_clock in aio_poll().

A couple of questions:

1. How would this work where the user has no main loop, e.g. qemu-img? A
  block driver may well still need timers.

The block driver should only use aio_ctx_clock, and those _would_ be
handled in aio_poll().

OK, so modify aio_poll not to run qemu_run_all_timers but to run
qemu_run_timer on that particular clock.

We'd still need to modify some of the executables to call init_timers()
or whatever it is, but that's easy enough.

I might have a go at that.

--
Alex Bligh

Reply via email to