WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] qemu-xen: remove buffered_io_timer

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] qemu-xen: remove buffered_io_timer
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 26 Nov 2010 18:26:05 +0000
Delivery-date: Fri, 26 Nov 2010 10:27:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
qemu-xen: remove buffered_io_timer

There is no need for an additional timer to handle buffered_io requests,
they are always handled before any other ioreq anyway.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff --git a/i386-dm/helper2.c b/i386-dm/helper2.c
index 94237b6..96256aa 100644
--- a/i386-dm/helper2.c
+++ b/i386-dm/helper2.c
@@ -99,9 +99,7 @@ long time_offset = 0;
 
 shared_iopage_t *shared_page = NULL;
 
-#define BUFFER_IO_MAX_DELAY  100
 buffered_iopage_t *buffered_io_page = NULL;
-QEMUTimer *buffered_io_timer;
 
 /* the evtchn fd for polling */
 int xce_handle = -1;
@@ -495,15 +493,6 @@ static void __handle_buffered_iopage(CPUState *env)
     }
 }
 
-static void handle_buffered_io(void *opaque)
-{
-    CPUState *env = opaque;
-
-    __handle_buffered_iopage(env);
-    qemu_mod_timer(buffered_io_timer, BUFFER_IO_MAX_DELAY +
-                  qemu_get_clock(rt_clock));
-}
-
 static void cpu_handle_ioreq(void *opaque)
 {
     extern int shutdown_requested;
@@ -559,10 +548,6 @@ int main_loop(void)
 
     main_loop_prepare();
 
-    buffered_io_timer = qemu_new_timer(rt_clock, handle_buffered_io,
-                                      cpu_single_env);
-    qemu_mod_timer(buffered_io_timer, qemu_get_clock(rt_clock));
-
     if (evtchn_fd != -1)
         qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, env);
 
@@ -584,7 +569,7 @@ int main_loop(void)
 
         /* Pull all outstanding ioreqs through the system */
         handle_buffered_pio();
-        handle_buffered_io(env);
+        __handle_buffered_iopage(env);
         main_loop_wait(1); /* For the select() on events */
 
         /* Save the device state */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] qemu-xen: remove buffered_io_timer, Stefano Stabellini <=