This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] Fix the very-slow-IDE-IO-speed issue of Q

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix the very-slow-IDE-IO-speed issue of Qemu 0.90
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:16:16 -0700
Delivery-date: Mon, 04 Jun 2007 03:29:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1180603815 -3600
# Node ID 340dbdb9cfec90902db7b5ccbe4411a03c358a52
# Parent  dc25aedfa4f32977dcea0c91af6853b586cba27b
Fix the very-slow-IDE-IO-speed issue of Qemu 0.90

c/s 15021 updated Qemu to 0.90. In the new Qemu's ide.c, asynchronous
IO (AIO) is used to replace the previous DMA thread; here when an AIO
request is completed, dom0 sends a signal SIGUSR2 to Qemu (see
block-raw.c: qemu_aio_init(),raw_aio_setup()), then the signal
interrupts the select() in main_loop_wait() at once, next,
qemu_aio_poll() is called to reap a completed AIO request.

However, in certain Linux distributions (i.e., x86_64 RHEL 4u4), if
Qemu is spawned by the python script image.py of Control Panel, the
SIGUSR2 of Qemu is blocked by default due to some reasons (i.e. it
seems Python 2.3.4 has this issue; 2.4.2 is ok); so in most cases the
select() in main_loop_wait() can only time out in 10ms, then the
qemu_aio_poll() is called - this results in a very slow disk IO

This patch ensures aio_sig_num is unblocked when the AIO is used in
Qemu 0.90.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
 tools/ioemu/block-raw.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r dc25aedfa4f3 -r 340dbdb9cfec tools/ioemu/block-raw.c
--- a/tools/ioemu/block-raw.c   Thu May 31 09:49:53 2007 +0100
+++ b/tools/ioemu/block-raw.c   Thu May 31 10:30:15 2007 +0100
@@ -189,9 +189,15 @@ void qemu_aio_init(void)
 void qemu_aio_init(void)
     struct sigaction act;
+    sigset_t set;
     aio_initialized = 1;
+    /* Ensure aio_sig_num is not blocked */ 
+    sigemptyset(&set);
+    sigaddset(&set, aio_sig_num);
+    sigprocmask(SIG_UNBLOCK, &set, NULL);
     act.sa_flags = 0; /* do not restart syscalls to interrupt select() */
     act.sa_handler = aio_signal_handler;

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix the very-slow-IDE-IO-speed issue of Qemu 0.90, Xen patchbot-unstable <=