From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPjfL-0006yI-9N for qemu-devel@nongnu.org; Thu, 14 Feb 2008 14:22:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPjfJ-0006vh-Ow for qemu-devel@nongnu.org; Thu, 14 Feb 2008 14:22:38 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPjfJ-0006vX-Lq for qemu-devel@nongnu.org; Thu, 14 Feb 2008 14:22:37 -0500 Received: from hall.aurel32.net ([88.191.38.19]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JPjfJ-0001Z0-B3 for qemu-devel@nongnu.org; Thu, 14 Feb 2008 14:22:37 -0500 Received: from aurel32 by hall.aurel32.net with local (Exim 4.63) (envelope-from ) id 1JPjfC-0004kL-SM for qemu-devel@nongnu.org; Thu, 14 Feb 2008 20:22:30 +0100 Date: Thu, 14 Feb 2008 20:22:30 +0100 From: Aurelien Jarno Message-ID: <20080214192230.GA17241@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Sender: "aurel32,,," Subject: [Qemu-devel] [PATCH] qemu: generate signals on tap I/O Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The patch below from KVM improves network transfers in a huge way. wget in a MIPS target now gives me a transfer speed of up to 120 Mbits/s with an e1000 emulated card. 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 --- vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index c87e8bc..fb01a46 100644 --- a/vl.c +++ b/vl.c @@ -3939,6 +3939,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); -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net