qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [5688] qemu: generate signals on tap I/O


From: Aurelien Jarno
Subject: [Qemu-devel] [5688] qemu: generate signals on tap I/O
Date: Tue, 11 Nov 2008 13:30:54 +0000

Revision: 5688
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5688
Author:   aurel32
Date:     2008-11-11 13:30:53 +0000 (Tue, 11 Nov 2008)

Log Message:
-----------
qemu: generate signals on tap I/O

Currently tap does not generate signals on I/O; this causes
network latency to be dependent on the timer tick (1ms without
dyntick, guest dependent with dyntick).  By generating a signal
on I/O, we can inform the guest immediately that a packet has
arrived.

Signed-off-by: Aurelien Jarno <address@hidden>

Modified Paths:
--------------
    trunk/net.c
    trunk/vl.c

Modified: trunk/net.c
===================================================================
--- trunk/net.c 2008-11-11 13:30:45 UTC (rev 5687)
+++ trunk/net.c 2008-11-11 13:30:53 UTC (rev 5688)
@@ -622,6 +622,8 @@
 
 /* fd support */
 
+void enable_sigio_timer(int fd);
+
 static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
 {
     TAPState *s;
@@ -630,6 +632,7 @@
     if (!s)
         return NULL;
     s->fd = fd;
+    enable_sigio_timer(fd);
     s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
     qemu_set_fd_handler(s->fd, tap_send, NULL, s);
     snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);

Modified: trunk/vl.c
===================================================================
--- trunk/vl.c  2008-11-11 13:30:45 UTC (rev 5687)
+++ trunk/vl.c  2008-11-11 13:30:53 UTC (rev 5688)
@@ -1403,7 +1403,7 @@
 
 #define RTC_FREQ 1024
 
-static void enable_sigio_timer(int fd)
+void enable_sigio_timer(int fd)
 {
     struct sigaction act;
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]