Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754557AbbHGCiv (ORCPT ); Thu, 6 Aug 2015 22:38:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38803 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753093AbbHGCit (ORCPT ); Thu, 6 Aug 2015 22:38:49 -0400 Date: Thu, 6 Aug 2015 17:53:26 +0200 From: Marc =?UTF-8?B?TWFyw60=?= To: "Kevin O'Connor" Cc: Stefan Hajnoczi , linux-kernel , qemu-devel , seabios@seabios.org, Drew , Gerd Hoffmann , Laszlo Subject: Re: QEMU fw_cfg DMA interface Message-ID: <20150806175326.4bb968b7@markmb_rh> In-Reply-To: <20150806153043.GB9661@morn.localdomain> References: <1438858816-29385-1-git-send-email-markmb@redhat.com> <20150806143745.559f94fa@markmb_rh> <20150806153043.GB9661@morn.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/0rUCNuJ+TwV_UGTBH=trjp6" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4764 Lines: 111 --MP_/0rUCNuJ+TwV_UGTBH=trjp6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thu, 6 Aug 2015 11:30:43 -0400 "Kevin O'Connor" wrote: > On Thu, Aug 06, 2015 at 02:37:45PM +0200, Marc Mar=C3=AD wrote: > > On Thu, 6 Aug 2015 13:27:16 +0100 > > Stefan Hajnoczi wrote: > >=20 > > > On Thu, Aug 6, 2015 at 12:00 PM, Marc Mar=C3=AD > > > wrote: > > > > When running a Linux guest on top of QEMU, using the -kernel > > > > options, this is the timing improvement for x86: > > > > > > > > QEMU commit 2be4f242b50a8 and SeaBIOS commit 908a58c1d5ff > > > > QEMU startup time: .078 > > > > BIOS startup time: .060 > > > > Kernel setup time: .578 > > > > Total time: .716 > > > > > > > > QEMU with this patch series and SeaBIOS with this patch series > > > > QEMU startup time: .080 > > > > BIOS startup time: .039 > > > > Kernel setup time: .002 > > > > Total time: .121 > > >=20 > > > Impressive results! > > >=20 > > > Is this a fully-featured QEMU build or did you disable things? > > >=20 > > > Is this the default SeaBIOS build or did you disable things? > > >=20 > >=20 > > This is the default QEMU configuration I get for my system. It's > > not a fully-featured QEMU, but it has a lot of things enabled. > > SeaBIOS has a default configuration (with debugging disabled). >=20 > Thanks! >=20 > What qemu command-line did you use during testing? Also, do you have > a quick primer on how to use the kvm trace stuff to obtain timings? >=20 The command line I used is: x86_64-softmmu/qemu-system-x86_64 --enable-kvm \ -kernel /boot/vmlinuz-4.0.7-300.fc22.x86_64 \ -L pc-bios/optionrom/ \ -bios roms/seabios/out/bios.bin -nographic And I used perf (and two out instructions in the BIOS) to measure the times: perf record -a -e kvm:\* -e sched:sched_process_exec And searching for sched:sched_process_exec, kvm:kvm_entry, pio_write at 0xf5 and pio_write at 0xf4. Out at 0xf5 is the one in "do_boot" function, and out at 0xf4 is the one just before the jump to the Linux kernel. I attach the script I've been using. It can be improved, but it works. It can be run like this: sudo ../../results/run_test.sh x86_64-softmmu/qemu-system-x86_64 \ --enable-kvm -kernel /boot/vmlinuz-4.0.8-300.fc22.x86_64 \ -L pc-bios/optionrom/ \ -bios roms/seabios/out/bios.bin -nographic Thanks Marc --MP_/0rUCNuJ+TwV_UGTBH=trjp6 Content-Type: application/x-shellscript Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=run_test.sh IyEvYmluL2Jhc2gKCmlmIFtbICRFVUlEIC1uZSAwIF1dOyB0aGVuCiAgICBlY2hvICJSdW4gYXMg cm9vdCwgcGxlYXNlIgogICAgZXhpdCAxCmZpCgojIFN0YXJ0IHJlY29yZGluZwpwZXJmIHJlY29y ZCAtYSAtZSBrdm06XCogLWUgc2NoZWQ6c2NoZWRfcHJvY2Vzc19leGVjICYKcGlkX3BlcmY9JCEK CnNsZWVwIDEKCiMgUnVuIHdoYXRldmVyIChUSElTI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yAteiAiJHQyIiBdXTsgdGhlbgogICAgZWNobyAiS2Vy bmVsIGJvb3QgdGltZSBpcyBlbXB0eSIKZWxzZQogICAgdDI9JHt0Mjo6LTF9CmZpCgojIFByaW50 IHJlc3VsdHMKZWNobyAtbiAiUUVNVSBzdGFydHVwIHRpbWU6ICIKZWNobyAiJHQxIC0gJHQwIiB8 IGJjCgplY2hvIC1uICJCSU9TIHN0YXJ0dXAgdGltZTogIgplY2hvICIkdDExIC0gJHQxIiB8IGJj CgppZiBbWyAtbiAiJHQyIiBdXTsgdGhlbgogICAgZWNobyAtbiAiS2VybmVsIHNldHVwIHRpbWU6 ICIKICAgIGVjaG8gIiR0MiAtICR0MTEiIHwgYmMKICAgIGVjaG8gLW4gIlRvdGFsIHRpbWU6ICIK ICAgIGVjaG8gIiR0MiAtICR0MCIgfCBiYwplbHNlCiAgICBlY2hvIC1uICJUb3RhbCB0aW1lOiAi CiAgICBlY2hvICIkdDExIC0gJHQwIiB8IGJjCmZpCgoK --MP_/0rUCNuJ+TwV_UGTBH=trjp6-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/