[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC] [PATCHv4 00/13] aio / timers: Add AioContext timers a
From: |
Alex Bligh |
Subject: |
[Qemu-devel] [RFC] [PATCHv4 00/13] aio / timers: Add AioContext timers and use ppoll |
Date: |
Fri, 26 Jul 2013 19:37:29 +0100 |
This patch series adds support for timers attached to an AioContext clock
which get called within aio_poll.
In doing so it removes alarm timers and moves to use ppoll where possible.
This patch set 'sort of' passes make check (see below for caveat)
including a new test harness for the aio timers, but has not been
tested much beyond that. In particular, the win32 changes have not
even been compile tested.
Caveat: I have had to alter tests/test-aio.c so the following error
no longer occurs.
ERROR:tests/test-aio.c:346:test_wait_event_notifier_noflush: assertion failed:
(aio_poll(ctx, false))
As gar as I can tell, this check was incorrect, in that it checking aio_poll
makes progress when in fact it should not make progress. I fixed an issue
where aio_poll was (as far as I can tell) wrongly returning true on
a timeout, and that generated this error.
Changes since v3
* Split up QEMUClock and QEMUClock list
* Improve commenting
* Fix comment in vl.c
* Change test/test-aio.c to reflect correct behaviour in aio_poll.
Changes since v2:
* Reordered to remove alarm timers last
* Added prctl(PR_SET_TIMERSLACK, 1, ...)
* Renamed qemu_g_poll_ns to qemu_poll_ns
* Moved declaration of above & drop glib types
* Do not use a global list of qemu clocks
* Add AioContext * to QEMUClock
* Split up conversion to use ppoll and timers
* Indentation fix
* Fix aio_win32.c aio_poll to return progress
* aio_notify / qemu_notify when timers are modified
* change comment in deprecation of clock options
Alex Bligh (13):
aio / timers: add qemu-timer.c utility functions
aio / timers: add ppoll support with qemu_poll_ns
aio / timers: Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer
slack
aio / timers: Make qemu_run_timers and qemu_run_all_timers return
progress
aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList
aio / timers: Add a QEMUTimerList to AioContext
aio / timers: Add an AioContext pointer to QEMUTimerList
aio / timers: aio_ctx_prepare sets timeout from AioContext timers
aio / timers: Convert aio_poll to use AioContext timers' deadline
aio / timers: Convert mainloop to use timeout
aio / timers: on timer modification, qemu_notify or aio_notify
aio / timers: Remove alarm timers
aio / timers: Add test harness for AioContext timers
aio-posix.c | 20 +-
aio-win32.c | 22 +-
async.c | 21 +-
configure | 37 +++
include/block/aio.h | 5 +
include/qemu/timer.h | 53 +++-
main-loop.c | 52 +++-
qemu-timer.c | 735 ++++++++++++++--------------------------------
tests/test-aio.c | 143 ++++++++-
tests/test-thread-pool.c | 3 +
vl.c | 4 +-
11 files changed, 544 insertions(+), 551 deletions(-)
--
1.7.9.5
- [Qemu-devel] [RFC] [PATCHv3 06/12] aio / timers: Add an AioContext pointer to QEMUClock, (continued)
- [Qemu-devel] [RFC] [PATCHv3 06/12] aio / timers: Add an AioContext pointer to QEMUClock, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 05/12] aio / timers: Add a clock to AioContext, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 01/12] aio / timers: add qemu-timer.c utility functions, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 07/12] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 08/12] aio / timers: Convert aio_poll to use AioContext timers' deadline, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 10/12] aio / timers: on timer modification, qemu_notify or aio_notify, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 09/12] aio / timers: convert mainloop to use timeout, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 12/12] aio / timers: Add test harness for AioContext timers, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv3 11/12] aio / timers: Remove alarm timers, Alex Bligh, 2013/07/25
- Re: [Qemu-devel] [RFC] [PATCHv3 00/12] aio / timers: Add AioContext timers and use ppoll, Alex Bligh, 2013/07/25
- [Qemu-devel] [RFC] [PATCHv4 00/13] aio / timers: Add AioContext timers and use ppoll,
Alex Bligh <=
- [Qemu-devel] [RFC] [PATCHv4 03/13] aio / timers: Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 01/13] aio / timers: add qemu-timer.c utility functions, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 04/13] aio / timers: Make qemu_run_timers and qemu_run_all_timers return progress, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 02/13] aio / timers: add ppoll support with qemu_poll_ns, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 06/13] aio / timers: Add a QEMUTimerList to AioContext, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 08/13] aio / timers: aio_ctx_prepare sets timeout from AioContext timers, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 07/13] aio / timers: Add an AioContext pointer to QEMUTimerList, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 11/13] aio / timers: on timer modification, qemu_notify or aio_notify, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 09/13] aio / timers: Convert aio_poll to use AioContext timers' deadline, Alex Bligh, 2013/07/26
- [Qemu-devel] [RFC] [PATCHv4 10/13] aio / timers: Convert mainloop to use timeout, Alex Bligh, 2013/07/26