repository: /home/avi/kvm
branch: master
commit b4e392c21c4b98c1c13af353caa3d6e6bcb6b8af
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Mon Oct 1 19:43:20 2007 +0200

    kvm: 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: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/qemu/vl.c b/qemu/vl.c
index 30c6561..fe49d2c 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -1170,7 +1170,8 @@ static void host_alarm_handler(int host_signum)
         last_clock = ti;
     }
 #endif
-    if (alarm_has_dynticks(alarm_timer) ||
+    if (1 ||
+       alarm_has_dynticks(alarm_timer) ||
         qemu_timer_expired(active_timers[QEMU_TIMER_VIRTUAL],
                            qemu_get_clock(vm_clock)) ||
         qemu_timer_expired(active_timers[QEMU_TIMER_REALTIME],
@@ -3847,6 +3848,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
     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);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to