[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves

From: Alex Bligh
Subject: Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves
Date: Wed, 17 Jul 2013 09:07:47 +0100


--On 17 July 2013 11:02:30 +0800 Stefan Hajnoczi <address@hidden> 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

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.

2. Are we guaranteed that no aio_poll user can repeatedly call aio_poll
  without exiting to the main loop?

3. Is it safe to anything you can do in a bh in a timer? IE are users every
  going to need to schedule a bh from a timer? If so, this seems a bit
  long winded for users that want bh functionality.

The timed bh solution (which I'm by no means set on) can use any QEMUClock
in the bh, so you get to choose the clock per BH, not per AioContext,
which may or may not have advantages.

Alex Bligh

reply via email to

[Prev in Thread] Current Thread [Next in Thread]