From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWjUf-0007o8-Nh for qemu-devel@nongnu.org; Wed, 15 Jun 2011 02:22:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWjUd-000380-Ig for qemu-devel@nongnu.org; Wed, 15 Jun 2011 02:22:25 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:43344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWjUd-00037l-8C for qemu-devel@nongnu.org; Wed, 15 Jun 2011 02:22:23 -0400 Received: by ywl41 with SMTP id 41so72074ywl.4 for ; Tue, 14 Jun 2011 23:22:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DF7E18F.6050708@cray.com> References: <4DF7E18F.6050708@cray.com> Date: Wed, 15 Jun 2011 07:22:22 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] High speed polling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Clay Andreasen Cc: qemu-devel@nongnu.org On Tue, Jun 14, 2011 at 11:32 PM, Clay Andreasen wrote: > I have a network device simulation that I am connecting to multiple > instances of Qemu (nodes) via a shared memory queue. =A0It works pretty w= ell > as > long as all of the nodes are initiating communication but when one node i= s > passive, it must poll to get packets. =A0So far the fastest I have been a= ble > to > get it to poll is about every 2M emulated clocks. > This is with CONFIG_HIGH_RES_TIMERS and CONFIG_NO_HZ on the host. > I also set MIN_TIMER_REARM_NS in qemu-timer.c to 100000. > Is there some way to increase the polling rate by about an order of > magnitude? Without more details it's hard to say what is going on: Running an x86 guest? Are you using ./configure --enable-io-thread? It sounds like you may not be using KVM? How many vcpus are running on the host in total compared to the number of logical CPUs on the host? You haven't given details on how you are polling in the guest. Are you running a polling loop in ring 0 or is the guest running a full-blown OS and polling from userspace? Why are you polling in the first place - to minimize latency? Stefan