From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FGqf8-0002gp-J1 for qemu-devel@nongnu.org; Tue, 07 Mar 2006 23:52:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FGqes-0000Og-Is for qemu-devel@nongnu.org; Tue, 07 Mar 2006 23:52:38 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGqes-0000Od-DO for qemu-devel@nongnu.org; Tue, 07 Mar 2006 23:52:22 -0500 Received: from [211.5.2.69] (helo=nm01omta015.dion.ne.jp) by monty-python.gnu.org with smtp (Exim 4.52) id 1FGqhd-00041s-Fz for qemu-devel@nongnu.org; Tue, 07 Mar 2006 23:55:13 -0500 Message-ID: <000e01c6426c$150fdc60$0464a8c0@athlon> From: "Kazu" References: <20060209110008.8216E922BC@dd3532.kasserver.com> <440CAD5B.7070109@helmutauer.de> Subject: Re: [Qemu-devel] Network Performance between Win Host and Linux Guest Date: Wed, 8 Mar 2006 13:52:20 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0009_01C642B7.84C306E0" 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 This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C642B7.84C306E0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Tuesday, March 07, 2006 6:44 AM Helmut Auer wrote: > vdr@helmutauer.de schrieb: >> Hello, >> I just upgraded to qemu 0.8.0 including vlan/tap patch and I noticed that the network speed is much slower than under 0.7.2 with tap patch ( 300KB/s vs 1MB/s ). >> Any hints what I can do to sped this up ? >> Helmut >> > No ideas what can cause this ? I just checked it again with the tapped > win binaries from the dion page. Net performance is about 15 times > faster under 0.7.2 > Attached patch improves the performance against current CVS. Regards, Kazu ------=_NextPart_000_0009_01C642B7.84C306E0 Content-Type: application/octet-stream; name="qemu-20060307-tap.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="qemu-20060307-tap.patch" Index: tap-win32.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /sources/qemu/qemu/tap-win32.c,v=0A= retrieving revision 1.2=0A= diff -u -r1.2 tap-win32.c=0A= --- tap-win32.c 19 Feb 2006 12:40:00 -0000 1.2=0A= +++ tap-win32.c 7 Mar 2006 04:18:44 -0000=0A= @@ -642,7 +642,7 @@=0A= }=0A= =0A= /* XXX: horrible, suppress this by using proper thread signaling */=0A= -void tap_win32_poll(void)=0A= +int tap_win32_poll(void)=0A= {=0A= TAPState *s =3D tap_win32_state;=0A= uint8_t *buf;=0A= @@ -650,13 +650,14 @@=0A= int size;=0A= =0A= if (!s)=0A= - return;=0A= + return -1;=0A= =0A= size =3D tap_win32_read(s->handle, &buf, max_size);=0A= if (size > 0) {=0A= qemu_send_packet(s->vc, buf, size);=0A= tap_win32_free_buffer(s->handle, buf);=0A= }=0A= + return size;=0A= }=0A= =0A= int tap_win32_init(VLANState *vlan, const char *ifname)=0A= Index: vl.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /sources/qemu/qemu/vl.c,v=0A= retrieving revision 1.165=0A= diff -u -r1.165 vl.c=0A= --- vl.c 20 Feb 2006 00:33:36 -0000 1.165=0A= +++ vl.c 7 Mar 2006 04:18:49 -0000=0A= @@ -3960,8 +3960,11 @@=0A= #ifdef _WIN32=0A= /* XXX: see how to merge it with the select. The constraint is=0A= that the select must be interrupted by the timer */=0A= - if (timeout > 0)=0A= - Sleep(timeout);=0A= + ret =3D tap_win32_poll();=0A= + if (ret <=3D 0) {=0A= + if (timeout > 0)=0A= + Sleep(timeout);=0A= + }=0A= #endif=0A= /* poll any events */=0A= /* XXX: separate device handlers from system ones */=0A= @@ -4002,9 +4005,6 @@=0A= }=0A= }=0A= }=0A= -#ifdef _WIN32=0A= - tap_win32_poll();=0A= -#endif=0A= =0A= #if defined(CONFIG_SLIRP)=0A= /* XXX: merge with the previous select() */=0A= Index: vl.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /sources/qemu/qemu/vl.h,v=0A= retrieving revision 1.105=0A= diff -u -r1.105 vl.h=0A= --- vl.h 20 Feb 2006 00:33:36 -0000 1.105=0A= +++ vl.h 7 Mar 2006 04:18:50 -0000=0A= @@ -307,7 +307,7 @@=0A= =0A= /* TAP win32 */=0A= int tap_win32_init(VLANState *vlan, const char *ifname);=0A= -void tap_win32_poll(void);=0A= +int tap_win32_poll(void);=0A= =0A= /* NIC info */=0A= =0A= ------=_NextPart_000_0009_01C642B7.84C306E0--