[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c ut
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions |
Date: |
Tue, 6 Aug 2013 14:02:18 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Aug 06, 2013 at 10:16:17AM +0100, Alex Bligh wrote:
> Add qemu_free_clock and expose qemu_new_clock and clock types.
>
> Add utility functions to qemu-timer.c for nanosecond timing.
>
> Add qemu_clock_deadline_ns to calculate deadlines to
> nanosecond accuracy.
>
> Add utility function qemu_soonest_timeout to calculate soonest deadline.
>
> Add qemu_timeout_ns_to_ms to convert a timeout in nanoseconds back to
> milliseconds for when ppoll is not used.
>
> Signed-off-by: Alex Bligh <address@hidden>
> ---
> include/qemu/timer.h | 17 ++++++++++++++
> qemu-timer.c | 63
> +++++++++++++++++++++++++++++++++++++++++++++-----
> 2 files changed, 74 insertions(+), 6 deletions(-)
There is still too much happening in this patch. Making
qemu_new_clock()/qemu_free_clock() public and moving the clock source
constants can be done in a single patch.
The next patch can change the semantics of qemu_clock_deadline() to
return INT32_MAX when the clock source is disabled. I'm not sure why
you do this and whether you checked that existing users continue to work
correctly? This is worth a separate patch.
Introducing qemu_timeout_ns_to_ms() and qemu_soonest_timeout() could be
done separately or together, I don't care as much there. Please include
an explanation of why qemu_timeout_ns_to_ms() will be needed in the
future (there are no callers in this patch).
- Re: [Qemu-devel] [RFC] [PATCHv6 05/16] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList, (continued)
- [Qemu-devel] [RFC] [PATCHv6 06/16] aio / timers: Untangle include files, Alex Bligh, 2013/08/06
- [Qemu-devel] [RFC] [PATCHv6 10/16] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Alex Bligh, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 10/16] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Stefan Hajnoczi, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 10/16] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Alex Bligh, 2013/08/06
- [Qemu-devel] [RFC] [PATCHv6 09/16] aio / timers: Add a notify callback to QEMUTimerList, Alex Bligh, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 09/16] aio / timers: Add a notify callback to QEMUTimerList, Stefan Hajnoczi, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 09/16] aio / timers: Add a notify callback to QEMUTimerList, Alex Bligh, 2013/08/06
- [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions, Alex Bligh, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions, Alex Bligh, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions, Stefan Hajnoczi, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions, Alex Bligh, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions, Stefan Hajnoczi, 2013/08/07
- Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions, Alex Bligh, 2013/08/07
- [Qemu-devel] [RFC] [PATCHv6 11/16] aio / timers: Convert aio_poll to use AioContext timers' deadline, Alex Bligh, 2013/08/06
- [Qemu-devel] [RFC] [PATCHv6 12/16] aio / timers: Convert mainloop to use timeout, Alex Bligh, 2013/08/06
- [Qemu-devel] [RFC] [PATCHv6 13/16] aio / timers: On timer modification, qemu_notify or aio_notify, Alex Bligh, 2013/08/06
- [Qemu-devel] [RFC] [PATCHv6 14/16] aio / timers: Use all timerlists in icount warp calculations, Alex Bligh, 2013/08/06
- [Qemu-devel] [RFC] [PATCHv6 16/16] aio / timers: Add test harness for AioContext timers, Alex Bligh, 2013/08/06