From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDYTv-00020s-3K for qemu-devel@nongnu.org; Tue, 11 Oct 2011 05:18:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDYTt-0006Jv-GY for qemu-devel@nongnu.org; Tue, 11 Oct 2011 05:18:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDYTt-0006JT-3s for qemu-devel@nongnu.org; Tue, 11 Oct 2011 05:18:37 -0400 Date: Tue, 11 Oct 2011 10:18:19 +0100 From: "Daniel P. Berrange" Message-ID: <20111011091819.GK14627@redhat.com> References: <20111010170803.GV9408@redhat.com> <4E933F2D.7090703@codemonkey.ws> <4E940791.1070600@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4E940791.1070600@redhat.com> Subject: Re: [Qemu-devel] Hack integrating SeaBios / LinuxBoot option rom with QEMU trace backends Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Gleb Natapov , qemu-devel , seabios@seabios.org, "Richard W.M. Jones" , Alexander Graf On Tue, Oct 11, 2011 at 11:08:33AM +0200, Avi Kivity wrote: > On 10/10/2011 09:01 PM, Alexander Graf wrote: > >>> For example, one execution of QEMU produced the following log: > >>> > >>> $ stap qemu-timing.stp > >>> 0.000 Start > >>> 0.036 Run > >>> 0.038 BIOS post > >>> 0.180 BIOS int 19 > >>> 0.181 BIOS boot OS > >>> 0.181 LinuxBoot copy kernel > >>> 1.371 LinuxBoot copy initrd > >> > >> Yeah, there was a thread a bit ago about the performance of the interface to read the kernel/initrd. I think at it was using single byte access instructions and there were patches to use string accessors instead? I can't remember where that threaded ended up. > > > >IIRC we're already using string accessors, but are still slow. Richard had a nice patch cooked up to basically have the fw_cfg interface be able to DMA its data to the guest. I like the idea. Avi did not. > > > >And yes, bad -kernel performance does hurt in some workloads. A lot. > > > > > > The rep/ins implementation is still slow, optimizing it can help. > > What does 'perf top' say when running this workload? To ensure it only recorded the LinuxBoot code, I created a 100 MB kernel image which takes approx 30 seconds to copy. Here is the perf output for approx 15 seconds of that copy: 1906.00 15.0% read_hpet [kernel] 1029.00 8.1% x86_emulate_insn [kvm] 863.00 6.8% test_cc [kvm] 661.00 5.2% emulator_get_segment [kvm] 631.00 5.0% kvm_mmu_pte_write [kvm] 535.00 4.2% __linearize [kvm] 431.00 3.4% do_raw_spin_lock [kernel] 356.00 2.8% vmx_get_segment [kvm_intel] 330.00 2.6% vmx_segment_cache_test_set [kvm_intel] 308.00 2.4% segmented_write [kvm] 291.00 2.3% vread_hpet [kernel].vsyscall_fn 251.00 2.0% vmx_get_cpl [kvm_intel] 230.00 1.8% trace_kvm_mmu_audit [kvm] 207.00 1.6% kvm_write_guest [kvm] 199.00 1.6% emulator_write_emulated [kvm] 187.00 1.5% emulator_write_emulated_onepage [kvm] 185.00 1.5% kvm_write_guest_page [kvm] 177.00 1.4% vmx_get_segment_base [kvm_intel] 158.00 1.2% fw_cfg_io_readb qemu-system-x86_64 148.00 1.2% register_address_increment [kvm] 142.00 1.1% emulator_write_phys [kvm] 134.00 1.1% acpi_os_read_port [kernel] Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|