From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34819 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8WtF-0006Q8-A6 for qemu-devel@nongnu.org; Sat, 09 Apr 2011 08:03:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8WtE-0001C8-8S for qemu-devel@nongnu.org; Sat, 09 Apr 2011 08:03:45 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:36065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8WtE-0001Bw-5i for qemu-devel@nongnu.org; Sat, 09 Apr 2011 08:03:44 -0400 Received: by gxk26 with SMTP id 26so2125377gxk.4 for ; Sat, 09 Apr 2011 05:03:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4D9FAD71.5020503@codemonkey.ws> References: <20110408202525.26c45c05@doriath> <4D9FAD71.5020503@codemonkey.ws> Date: Sat, 9 Apr 2011 13:03:43 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: Slow PXE boot in qemu.git (fast in qemu-kvm.git) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino , blauwirbel@gmail.com, alex.williamson@redhat.com, avi@redhat.com On Sat, Apr 9, 2011 at 1:50 AM, Anthony Liguori wro= te: > On 04/08/2011 06:25 PM, Luiz Capitulino wrote: >> >> Hi there, >> >> Summary: >> >> =A0- PXE boot in qemu.git (HEAD f124a41) is quite slow, more than 5 minu= tes. >> Got >> =A0 =A0the problem with e1000, virtio and rtl8139. However, pcnet *works= * >> (it's >> =A0 =A0as fast as qemu-kvm.git) >> >> =A0- PXE boot in qemu-kvm.git (HEAD df85c051) is fast, less than a minut= e. >> Tried >> =A0 =A0with e1000, virtio and rtl8139 (I don't remember if I tried with = pcnet) >> >> I tried with qemu.git v0.13.0 in order to check if this was a regression= , >> but >> I got the same problem... >> >> Then I inspected qemu-kvm.git under the assumption that it could have a >> fix >> that wasn't commited to qemu.git. Found this: >> >> =A0- commit 0836b77f0f65d56d08bdeffbac25cd6d78267dc9 which is merge, wor= ks >> >> =A0- commit cc015e9a5dde2f03f123357fa060acbdfcd570a4 does not work (it's >> slow) >> >> I tried a bisect, but it brakes due to gcc4 vs. gcc3 changes. Then I >> inspected >> commits manually, and found out that commit 64d7e9a4 doesn't work, which >> makes >> me think that the fix could be in the conflict resolution of 0836b77f, >> which >> makes me remember that I'm late for diner, so my conclusions at this poi= nt >> are >> not reliable :) > > Can you run kvm_stat to see what the exit rates are? > > Maybe we're missing a coalesced io in qemu.git? =A0It's also possible tha= t > gpxe is hitting the apic or pit quite a lot. In gPXE's main loop it will do real <-> protected mode switches and poll hardware. It doesn't handle interrupts itself but sets up the 8254 timer chip. I once found that polling the keyboard only every couple of gPXE main loop iterations significantly speeds up network throughput under KVM. I never got around to auditing the entire main loop and implementing a clean patch. Anyway, kvm_stat is a good idea. It may be tickling qemu in a way that qemu-kvm is immune to. Stefan