[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Network Performance between Win Host and Linux
From: |
Leonardo E. Reiter |
Subject: |
Re: [Qemu-devel] Network Performance between Win Host and Linux |
Date: |
Tue, 11 Apr 2006 17:00:54 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051013) |
Hi Ken,
please disregard my last mail on this... here's a current patch against
today's CVS. I didn't realize that vl.c already converted from poll()
to select(), so the patch logic is much easier and cleaner.
Check it out... I tested it minimally and it seems to work - only tested
it on Linux host,
Leo
P.S. you can apply this one with -p0 arg to patch.
Kenneth Duda wrote:
Paul, thanks for the note.
In my case, the guest CPU is idle. The host CPU utilization is only 5
or 10 percent when running "find / -print > /dev/null" on the guest.
So I don't think guest interrupt latency is the issue for me in this
case.
--
Leonardo E. Reiter
Vice President of Product Development, CTO
Win4Lin, Inc.
Virtual Computing from Desktop to Data Center
Main: +1 512 339 7979
Fax: +1 512 532 6501
http://www.win4lin.com
Index: vl.c
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.c,v
retrieving revision 1.168
diff -a -u -r1.168 vl.c
--- vl.c 9 Apr 2006 01:32:52 -0000 1.168
+++ vl.c 11 Apr 2006 20:56:56 -0000
@@ -3952,8 +3952,11 @@
void main_loop_wait(int timeout)
{
IOHandlerRecord *ioh, *ioh_next;
- fd_set rfds, wfds;
+ fd_set rfds, wfds, xfds;
int ret, nfds;
+#if defined(CONFIG_SLIRP)
+ int slirp_nfds;
+#endif
struct timeval tv;
#ifdef _WIN32
@@ -3967,6 +3970,7 @@
nfds = -1;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
+ FD_ZERO(&xfds);
for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
if (ioh->fd_read &&
(!ioh->fd_read_poll ||
@@ -3988,7 +3992,14 @@
#else
tv.tv_usec = timeout * 1000;
#endif
- ret = select(nfds + 1, &rfds, &wfds, NULL, &tv);
+#if defined(CONFIG_SLIRP)
+ if (slirp_inited) {
+ slirp_select_fill(&slirp_nfds, &rfds, &wfds, &xfds);
+ if (slirp_nfds > nfds)
+ nfds = slirp_nfds;
+ }
+#endif
+ ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv);
if (ret > 0) {
/* XXX: better handling of removal */
for(ioh = first_io_handler; ioh != NULL; ioh = ioh_next) {
@@ -4000,30 +4011,14 @@
ioh->fd_write(ioh->opaque);
}
}
- }
-#ifdef _WIN32
- tap_win32_poll();
-#endif
-
#if defined(CONFIG_SLIRP)
- /* XXX: merge with the previous select() */
- if (slirp_inited) {
- fd_set rfds, wfds, xfds;
- int nfds;
- struct timeval tv;
-
- nfds = -1;
- FD_ZERO(&rfds);
- FD_ZERO(&wfds);
- FD_ZERO(&xfds);
- slirp_select_fill(&nfds, &rfds, &wfds, &xfds);
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- ret = select(nfds + 1, &rfds, &wfds, &xfds, &tv);
- if (ret >= 0) {
+ if (slirp_inited)
slirp_select_poll(&rfds, &wfds, &xfds);
- }
+#endif
}
+
+#ifdef _WIN32
+ tap_win32_poll();
#endif
if (vm_running) {
- [Qemu-devel] Network Performance between Win Host and Linux, Kenneth Duda, 2006/04/11
- Re: [Qemu-devel] Network Performance between Win Host and Linux, Paul Brook, 2006/04/11
- Re: [Qemu-devel] Network Performance between Win Host and Linux, Kenneth Duda, 2006/04/11
- Re: [Qemu-devel] Network Performance between Win Host and Linux, Leonardo E. Reiter, 2006/04/11
- Re: [Qemu-devel] Network Performance between Win Host and Linux, Kenneth Duda, 2006/04/11
- Re: [Qemu-devel] Network Performance between Win Host and Linux, Leonardo E. Reiter, 2006/04/11
- Re: [Qemu-devel] Network Performance between Win Host and Linux, Kenneth Duda, 2006/04/11
- Re: [Qemu-devel] Network Performance between Win Host and Linux,
Leonardo E. Reiter <=
[Qemu-devel] Re: Network Performance between Win Host and Linux, Kenneth Duda, 2006/04/11
Re: [Qemu-devel] Re: Network Performance between Win Host and Linux, Leonardo E. Reiter, 2006/04/12