Received: from eggs.gnu.org ([2001:4830:134:3::10]:54246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmKEN-0001Km-2n for qemu-devel@nongnu.org; Thu, 06 Nov 2014 05:24:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmKEH-0001gq-0j for qemu-devel@nongnu.org; Thu, 06 Nov 2014 05:23:55 -0500 Received: from cantor2.suse.de ([195.135.220.15]:41093 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmKEG-0001gf-Qk for qemu-devel@nongnu.org; Thu, 06 Nov 2014 05:23:48 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) From: Alexander Graf In-Reply-To: <20141106121102.57ed6a0bffcce88a4ffad5ec@gmail.com> Date: Thu, 6 Nov 2014 11:23:47 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20141106121102.57ed6a0bffcce88a4ffad5ec@gmail.com> Subject: Re: [Qemu-devel] [PATCH v3] qemu-log: add log category for MMU info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Antony Pavlov Cc: Peter Maydell , "qemu-devel@nongnu.org" , Blue Swirl , "Edgar E. Iglesias" , Guan Xuetao , Aurelien Jarno , Richard Henderson > Am 06.11.2014 um 09:11 schrieb Antony Pavlov : >=20 >=20 >>> Running barebox on qemu-system-mips* with '-d unimp' overloads >>> stderr by very very many mips_cpu_handle_mmu_fault() messages: >>>=20 >>> mips_cpu_handle_mmu_fault address=3Db80003fd ret 0 physical 00000000180= 003fd=20 >>> prot 3 >>> mips_cpu_handle_mmu_fault address=3Da0800884 ret 0 physical 00000000008= 00884=20 >>> prot 3 >>> mips_cpu_handle_mmu_fault pc a080cd80 ad b80003fd rw 0 mmu_idx 0 >>>=20 >>> So it's very difficult to find LOG_UNIMP message. >>>=20 >>> The mips_cpu_handle_mmu_fault() messages appears on enabling ANY >>> logging! It's not very handy. >>>=20 >>> Adding separate log category for *_cpu_handle_mmu_fault() >>> logging fixes the problem. >>>=20 >>> Signed-off-by: Antony Pavlov >>=20 >> Have you benchmarked the performance delta with this patch applied? Just >> boot up a random small PPC guest that shuts down immediately and "time" >> it with and without the patch applied. >=20 > Here is my simple benchmark. >=20 > I have used buildroot with qemu_ppc64_pseries_defconfig configuration. >=20 > After successfull rootfs image build I patched inittab for halting-after-b= oot: >=20 > --- a/output/images/rootfs.ext2/etc/inittab 2014-11-06 10:21:25.0241= 98993 +0300 > +++ b/output/images/rootfs.ext2/etc/inittab 2014-11-06 10:20:57.0894= 21643 +0300 > @@ -23,10 +23,11 @@ > # now run any rc scripts > ::sysinit:/etc/init.d/rcS >=20 > -::askfirst:-/bin/sh > +::sysinit:/sbin/halt > +#::askfirst:-/bin/sh >=20 > # Put a getty on the serial port > -hvc0::respawn:/sbin/getty -L hvc0 115200 vt100 # GENERIC_SERIAL > +#hvc0::respawn:/sbin/getty -L hvc0 115200 vt100 # GENERIC_SERIAL >=20 > # Stuff to do for the 3-finger salute > ::ctrlaltdel:/sbin/reboot >=20 >=20 > Here is my qemu cmdline: >=20 > buildroot$ time ~/qemu.git/ppc64-softmmu/qemu-system-ppc64 -M pseries -cpu= POWER7 -m 256 -kernel output/images/vmlinux -append 'console=3Dhvc0 root=3D= /dev/sda' -drive file=3Doutput/images/rootfs.ext2,if=3Dscsi,index=3D0 -seria= l stdio -nographic -monitor none >=20 >=20 > I use my 'not-very-busy' AMD Opteron 6176 SE-based server for testing. >=20 > Three 'time' command outputs; qemu with "qemu-log: add log category for MM= U info" patch: >=20 > real 0m39.744s > user 0m36.940s > sys 0m1.216s >=20 > real 0m39.552s > user 0m37.200s > sys 0m0.924s >=20 > real 0m39.585s > user 0m37.340s > sys 0m0.704s >=20 >=20 > Three 'time' command outputs; qemu without "qemu-log: add log category for= MMU info" patch: >=20 > real 0m39.732s > user 0m37.484s > sys 0m0.756s >=20 > real 0m40.077s > user 0m37.920s > sys 0m0.744s >=20 > real 0m39.766s > user 0m37.304s > sys 0m1.032s >=20 >=20 > So the performance delta is less than experimental error. Ok, works for me then :). Ackef-by: Alexander Graf Alex