From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmI99-0007Hh-Fz for qemu-devel@nongnu.org; Thu, 06 Nov 2014 03:10:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmI90-0008Bo-E3 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 03:10:23 -0500 Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]:38813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmI90-0008Bg-2R for qemu-devel@nongnu.org; Thu, 06 Nov 2014 03:10:14 -0500 Received: by mail-lb0-f180.google.com with SMTP id u10so433494lbd.39 for ; Thu, 06 Nov 2014 00:10:12 -0800 (PST) Date: Thu, 6 Nov 2014 12:11:02 +0400 From: Antony Pavlov Message-Id: <20141106121102.57ed6a0bffcce88a4ffad5ec@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Alexander Graf Cc: Peter Maydell , qemu-devel@nongnu.org, Blue Swirl , "Edgar E. Iglesias" , Guan Xuetao , Aurelien Jarno , Richard Henderson > > 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 000000001= 80003fd=20 > > prot 3 > > mips_cpu_handle_mmu_fault address=3Da0800884 ret 0 physical 000000000= 0800884=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. Here is my simple benchmark. I have used buildroot with qemu_ppc64_pseries_defconfig configuration. After successfull rootfs image build I patched inittab for halting-after-bo= ot: --- a/output/images/rootfs.ext2/etc/inittab 2014-11-06 10:21:25.02419= 8993 +0300 +++ b/output/images/rootfs.ext2/etc/inittab 2014-11-06 10:20:57.08942= 1643 +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 Here is my qemu cmdline: 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 -seri= al stdio -nographic -monitor none I use my 'not-very-busy' AMD Opteron 6176 SE-based server for testing. Three 'time' command outputs; qemu with "qemu-log: add log category for MMU= info" patch: real 0m39.744s user 0m36.940s sys 0m1.216s real 0m39.552s user 0m37.200s sys 0m0.924s real 0m39.585s user 0m37.340s sys 0m0.704s Three 'time' command outputs; qemu without "qemu-log: add log category for = MMU info" patch: real 0m39.732s user 0m37.484s sys 0m0.756s real 0m40.077s user 0m37.920s sys 0m0.744s real 0m39.766s user 0m37.304s sys 0m1.032s So the performance delta is less than experimental error. --=A0 Best regards, =A0 Antony Pavlov