[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: |
Alex Bligh |
Subject: |
Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions |
Date: |
Tue, 06 Aug 2013 13:30:18 +0100 |
Stefan,
--On 6 August 2013 14:02:18 +0200 Stefan Hajnoczi <address@hidden>
wrote:
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.
OK I'll split it up.
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?
Rationale: I suspect it doesn't really matter (see below) but the
rationale was that if the clock is disabled, timers will expire in
an infinite time. I was trying to make treatment of expire times
consistent throughout qemu-timer, and this was the one place a
disabled clock was being treated as if the timers were going to
expire.
Audit: The only users (at least by the time my patch set is finished) are:
* cpus.c within qtest_warp(), which appears not to consider the case of
vm_clock being disabled. I do not think this function has been written
considering the possibility that there are no active vm_clock timers
or where the deadline is > INT32_MAX ns away.
* qtest_process_command(), evaluating clock_step, which calls the above.
My preference would be to move these to qemu_clock_deadline_ns (without
the INT32_MAX check) and delete the old qemu_clock_deadline routine
entirely, but I don't really understand the full set of circumstances
in which the qtest routines are meant to work.
Of course cpus.c now uses qemu_clock_deadline_ns_all for a couple of
the previous two uses, and in patch 14 of my series I've commented
that I think the previous use was buggy but have maintained bug-for-bug
compatibility.
I'd particularly like comments on patch 14, which I've mostly blind
coded based on what Paolo asked for. I'm afraid I found the icount
stuff a bit opaque. I'll hold off from v7 until someone's had a look
at these.
Please include
an explanation of why qemu_timeout_ns_to_ms() will be needed in the
future (there are no callers in this patch).
You mean in the commit text as well as the following?
+/* Transition function to convert a nanosecond timeout to ms
+ * This is used where a system does not support ppoll
+ */
--
Alex Bligh
- Re: [Qemu-devel] [RFC] [PATCHv6 05/16] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList, (continued)
- Re: [Qemu-devel] [RFC] [PATCHv6 05/16] aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList, Stefan Hajnoczi, 2013/08/06
- [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, 2013/08/06
- Re: [Qemu-devel] [RFC] [PATCHv6 01/16] aio / timers: add qemu-timer.c utility functions,
Alex Bligh <=
- 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
- [Qemu-devel] [RFC] [PATCHv6 02/16] aio / timers: add ppoll support with qemu_poll_ns, Alex Bligh, 2013/08/06