qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff
@ 2013-07-21  8:42 Liu Ping Fan
  2013-07-21  8:42 ` [Qemu-devel] [RFC 1/8] timer: associate alarm_timer with AioContext Liu Ping Fan
                   ` (9 more replies)
  0 siblings, 10 replies; 63+ messages in thread
From: Liu Ping Fan @ 2013-07-21  8:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Stefan Hajnoczi, Jan Kiszka, Alex Bligh,
	Anthony Liguori, Paolo Bonzini

Currently, the timers run on iothread within BQL, so virtio-block dataplane can not use throttle,
as Stefan Hajnoczi pointed out in his patches to port dataplane onto block layer.(Thanks, Stefan)
To enable this feature, I plan to enable timers to run on AioContext's thread.
And maybe in future, hpet can run with its dedicated thread too.

Also, I see Alex Bligh is on the same effort by another method,(it is a good idea) 
  "[RFC] aio/async: Add timed bottom-halves".
So I think it is better to post my series for discussion, although I have not thought
very clearly point, e.g. sigaction 

This series ports two parts of timer stuff onto AioContext: alarm timer and timer list.
Currently I worked based on Stefanha's git tree
	 https://github.com/stefanha/qemu.git dataplane-block-layer.

---
Open issue:
  The thread safe problem on timer list. To resolve that, I plan to adopt the bh model.
(Not sure about this, maybe Stefan's solution in another thread is better)  
Although leave most of the race issue unresolved, patch 4 has tried to fix one of
them as Jan Kiszka points out that vm_clock can be read outside BQL, thanks Jan :)



Liu Ping Fan (8):
  timer: associate alarm_timer with AioContext
  timer: pick out timer list info from QemuClock
  timer: make timers_state static
  timer: protect timers_state with lock
  timer: associate timer with AioContext
  timer: run timers on aio_poll
  block: associate BlockDriverState with AioContext
  block: enable throttle with aiocontext

 aio-posix.c                     |   2 +
 async.c                         |  12 ++
 block.c                         |  13 ++-
 cpus.c                          |  29 ++++-
 hw/block/dataplane/virtio-blk.c |   1 +
 include/block/aio.h             |  14 +++
 include/block/block.h           |   1 +
 include/block/block_int.h       |   1 +
 include/qemu/timer.h            |  24 +++-
 main-loop.c                     |   6 -
 qemu-timer.c                    | 237 +++++++++++++++++++++++++++-------------
 11 files changed, 253 insertions(+), 87 deletions(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2013-07-31  9:02 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-21  8:42 [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff Liu Ping Fan
2013-07-21  8:42 ` [Qemu-devel] [RFC 1/8] timer: associate alarm_timer with AioContext Liu Ping Fan
2013-07-22  6:55   ` Jan Kiszka
2013-07-21  8:42 ` [Qemu-devel] [RFC 2/8] timer: pick out timer list info from QemuClock Liu Ping Fan
2013-07-21  8:43 ` [Qemu-devel] [RFC 3/8] timer: make timers_state static Liu Ping Fan
2013-07-22  6:36   ` Jan Kiszka
2013-07-22 17:40     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2013-07-21  8:43 ` [Qemu-devel] [RFC 4/8] timer: protect timers_state with lock Liu Ping Fan
2013-07-22  6:40   ` Jan Kiszka
2013-07-21  8:43 ` [Qemu-devel] [RFC 5/8] timer: associate timer with AioContext Liu Ping Fan
2013-07-21  8:43 ` [Qemu-devel] [RFC 6/8] timer: run timers on aio_poll Liu Ping Fan
2013-07-21  9:55   ` Alex Bligh
2013-07-23  2:56     ` liu ping fan
2013-07-23 14:22       ` Alex Bligh
2013-07-21  8:43 ` [Qemu-devel] [RFC 7/8] block: associate BlockDriverState with AioContext Liu Ping Fan
2013-07-21  8:43 ` [Qemu-devel] [RFC 8/8] block: enable throttle with aiocontext Liu Ping Fan
2013-07-21  9:53 ` [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff Alex Bligh
2013-07-22  4:38   ` liu ping fan
2013-07-22  6:28     ` Jan Kiszka
2013-07-23  2:51       ` liu ping fan
2013-07-25 11:44         ` Stefan Hajnoczi
2013-07-25 12:01           ` Jan Kiszka
2013-07-22  9:40     ` Alex Bligh
2013-07-22 10:18       ` liu ping fan
2013-07-23  2:53         ` liu ping fan
2013-07-23 10:30           ` Paolo Bonzini
2013-07-24  1:28             ` liu ping fan
2013-07-24  6:42               ` Paolo Bonzini
2013-07-24  7:31                 ` Alex Bligh
2013-07-24  7:43                   ` Paolo Bonzini
2013-07-24  8:01                     ` Alex Bligh
2013-07-24  8:19                       ` Paolo Bonzini
2013-07-24  8:37                       ` Alex Bligh
2013-07-24 11:28                         ` Paolo Bonzini
2013-07-24  8:30                     ` liu ping fan
2013-07-24  7:43                 ` liu ping fan
2013-07-24  7:54                   ` Paolo Bonzini
2013-07-24  8:06                     ` Alex Bligh
2013-07-24 14:46                     ` [Qemu-devel] [PATCHv2a] [RFC 8/7 (really)] Add prctl(PR_SET_TIMERSLACK, 1, ...) to reduce timer slack Alex Bligh
2013-07-23 14:21           ` [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff Alex Bligh
2013-07-25 11:47         ` Stefan Hajnoczi
2013-07-25 12:05 ` Stefan Hajnoczi
2013-07-25 12:21   ` Alex Bligh
2013-07-25 12:32     ` Jan Kiszka
2013-07-25 12:35       ` Paolo Bonzini
2013-07-25 12:38         ` Jan Kiszka
2013-07-25 12:41           ` Stefan Hajnoczi
2013-07-25 12:48             ` Jan Kiszka
2013-07-25 13:02               ` Paolo Bonzini
2013-07-25 13:06                 ` Jan Kiszka
2013-07-25 13:31                   ` Stefan Hajnoczi
2013-07-25 14:01                     ` Jan Kiszka
2013-07-25 12:59           ` Paolo Bonzini
2013-07-25 18:53       ` Alex Bligh
2013-07-26  8:43         ` Stefan Hajnoczi
2013-07-26  9:08           ` Alex Bligh
2013-07-26  9:19             ` Paolo Bonzini
2013-07-29  8:58           ` Kevin Wolf
2013-07-29 10:22             ` Alex Bligh
2013-07-29 10:45             ` Paolo Bonzini
2013-07-31  9:02             ` Stefan Hajnoczi
2013-07-26 10:05         ` Jan Kiszka
2013-07-26 19:29           ` Alex Bligh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).