From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhkC-0004HG-Sa for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:54:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYhkB-0000M1-7R for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:54:36 -0400 Received: from exprod6og107.obsmtp.com ([64.18.1.208]:54904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhkA-0000L1-U9 for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:54:35 -0400 Message-ID: <4DFF7B34.6090005@cray.com> Date: Mon, 20 Jun 2011 11:54:12 -0500 From: Clay Andreasen MIME-Version: 1.0 References: <4DF7E18F.6050708@cray.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] High speed polling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "qemu-devel@nongnu.org" Thank you for your reply. I am still a novice with Qemu so pardon me if I don't make any sense. I tried --enable-io-thread. I get the error: cpus.o: In function `qemu_kvm_eat_signal': cpus.c:(.text+0x111a): undefined reference to `kvm_on_sigbus_vcpu' so I assume it requires KVM. I'm not using KVM because I don't have full control over the host I am running on. I have 8 host processors running 4 Qemu copies (1 vcpu each) plus my network simulator. I have tried polling via a call in vl.c:mainloop and via qemu_mod_timer(). There doesn't appear to be much difference. The guest is a full-blown x86_64 OS. I am polling to minimize latency. I am looking at other ways to tolerate the current latency in case I can't do much better. Clay On 06/15/11 01:22, Stefan Hajnoczi wrote: > 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. It works pretty well >> as >> long as all of the nodes are initiating communication but when one node is >> passive, it must poll to get packets. So far the fastest I have been able >> 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