qemu-devel
[Top][All Lists]
Advanced

[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: Fri, 19 Jul 2013 07:38:31 +0100

Stefan,

--On 19 July 2013 09:58:50 +0800 Stefan Hajnoczi <address@hidden> wrote:

  Options:

  a) restore alarm timers (at least for the time being). Make all
     alarm timers do qemu_notify_event. However, only run the AioContext
     clock's timers within aio_poll. This is the least intrusive change.

  b) calculate the timeout in aio_poll with respect to the minimum
     deadline across all clocks, not just AioContext's clock. Use the
     same logic in mainloop.

  I'd go for (b), except for the millisecond accuracy thing. So my
  temptation (sadly) is (a).

I think this is a non-issue because host_alarm_handler() can only be
called from the main loop:

main-loop.c:qemu_signal_init() sets up signalfd to monitor SIGALRM.
Therefore we do not asynchronously invoke the SIGALRM signals handler.
It is only invoked from main-loop.c:sigfd_handler() when the main loop
runs.

That's how I read the code.  I haven't checked a running process to be
sure.

Not sure that's the case on win32, but OK let's go with that.

However, I still don't quite see how the poll in the mainloop is
meant to exit when a timer expires. There's now no qemu_notify_event,
and no SIGALRM, and the timeout will still be infinite (unless I
calculate the timeout as the minimum across all clocks, in which
case I might as well do (b) above).

--
Alex Bligh



reply via email to

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