From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jt9PV-0000tL-Nf for qemu-devel@nongnu.org; Mon, 05 May 2008 18:43:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jt9PT-0000sS-FV for qemu-devel@nongnu.org; Mon, 05 May 2008 18:43:52 -0400 Received: from [199.232.76.173] (port=54425 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt9PT-0000sN-8H for qemu-devel@nongnu.org; Mon, 05 May 2008 18:43:51 -0400 Received: from py-out-1112.google.com ([64.233.166.181]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jt9PS-0006uk-Vd for qemu-devel@nongnu.org; Mon, 05 May 2008 18:43:51 -0400 Received: by py-out-1112.google.com with SMTP id u52so1672341pyb.10 for ; Mon, 05 May 2008 15:43:50 -0700 (PDT) Message-ID: <481F8DA1.60605@codemonkey.ws> Date: Mon, 05 May 2008 17:43:45 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [4341] qemu: generate signals on tap I/O References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Aurelien Jarno wrote: > Revision: 4341 > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4341 > Author: aurel32 > Date: 2008-05-05 21:26:43 +0000 (Mon, 05 May 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 > > Modified Paths: > -------------- > trunk/vl.c > > Modified: trunk/vl.c > =================================================================== > --- trunk/vl.c 2008-05-05 21:26:31 UTC (rev 4340) > +++ trunk/vl.c 2008-05-05 21:26:43 UTC (rev 4341) > @@ -4030,6 +4030,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); > I still haven't seen anyone explain why this results in a performance improvement. The SIGIO handler is tied to the host_alarm_handler which will not dispatch IO. It surprises me that it has any affect at all. FWIW, we're getting rid of SIGIO in KVM. It doesn't improve performance verses a properly implemented select lop. Regards, Anthony Liguori > > >