From: "Leonardo E. Reiter" <lreiter@win4lin.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Network Performance between Win Host and Linux
Date: Tue, 11 Apr 2006 17:00:54 -0400 [thread overview]
Message-ID: <443C1906.3070305@win4lin.com> (raw)
In-Reply-To: <6fe044190604111049j186d7c44oea9568ce1a8b54f3@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
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
[-- Attachment #2: qemu-select-merge.patch --]
[-- Type: text/x-patch, Size: 2057 bytes --]
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) {
next prev parent reply other threads:[~2006-04-11 21:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-11 17:20 [Qemu-devel] Network Performance between Win Host and Linux Kenneth Duda
2006-04-11 17:28 ` Paul Brook
2006-04-11 17:49 ` Kenneth Duda
2006-04-11 18:19 ` Helmut Auer
2006-04-12 2:10 ` Kazu
2006-04-11 20:40 ` Leonardo E. Reiter
2006-04-11 21:46 ` Kenneth Duda
2006-04-11 21:58 ` Leonardo E. Reiter
2006-04-11 22:42 ` Kenneth Duda
2006-04-11 21:00 ` Leonardo E. Reiter [this message]
2006-04-11 22:36 ` [Qemu-devel] " Kenneth Duda
2006-04-12 14:04 ` Leonardo E. Reiter
2006-04-12 18:19 ` Kenneth Duda
2006-04-12 18:26 ` Leonardo E. Reiter
2006-04-12 14:31 ` Leonardo E. Reiter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=443C1906.3070305@win4lin.com \
--to=lreiter@win4lin.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.