From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0pLP-0002dk-N8 for qemu-devel@nongnu.org; Sun, 21 Jul 2013 04:50:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0pLO-00078G-3q for qemu-devel@nongnu.org; Sun, 21 Jul 2013 04:50:19 -0400 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:65300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0pLN-000781-UA for qemu-devel@nongnu.org; Sun, 21 Jul 2013 04:50:18 -0400 Received: by mail-pa0-f44.google.com with SMTP id lj1so5984914pab.17 for ; Sun, 21 Jul 2013 01:50:16 -0700 (PDT) From: Liu Ping Fan Date: Sun, 21 Jul 2013 16:42:57 +0800 Message-Id: <1374396185-10870-1-git-send-email-pingfank@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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