From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uat7K-0005hW-4r for qemu-devel@nongnu.org; Fri, 10 May 2013 15:36:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uat7G-0000Wh-GN for qemu-devel@nongnu.org; Fri, 10 May 2013 15:36:34 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:39812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uat7F-0000WZ-Uy for qemu-devel@nongnu.org; Fri, 10 May 2013 15:36:30 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 11 May 2013 05:23:33 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 6464A2BB0050 for ; Sat, 11 May 2013 05:36:03 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4AJZtgC11206808 for ; Sat, 11 May 2013 05:35:56 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4AJa1QC016061 for ; Sat, 11 May 2013 05:36:02 +1000 From: Anthony Liguori In-Reply-To: <20130510190019.GE19954@ohm.aurel32.net> References: <1368188203-3407-1-git-send-email-pbonzini@redhat.com> <874nebdm4r.fsf@codemonkey.ws> <518CF130.2030402@redhat.com> <518CF4C4.6020901@suse.de> <518CF669.30803@redhat.com> <871u9ezypj.fsf@codemonkey.ws> <518D0B68.505@redhat.com> <87ip2q91ho.fsf@codemonkey.ws> <20130510190019.GE19954@ohm.aurel32.net> Date: Fri, 10 May 2013 14:35:54 -0500 Message-ID: <87mws2631h.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Paolo Bonzini , mst@redhat.com, qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= Aurelien Jarno writes: > On Fri, May 10, 2013 at 12:41:07PM -0500, Anthony Liguori wrote: >> Paolo Bonzini writes: >> >> > Il 10/05/2013 16:39, Anthony Liguori ha scritto: >> >> I just oppose the notion of disabling casts and *especially* only >> >> disabling casts for official builds. >> > >> > This actually happens all the time. Exactly this kind of type-safe cast >> > is disabled in releases of GCC, but enabled when building from svn trunk. >> >> Let's assume for a moment that you are right and this behavior is what >> we should have. Let's also assume there is a real regression here >> which has yet to have been established. > > I have pointed out in another mail of this thread, that this type > checking account for about 9% of slowdown. Isn't that enough to say it's > a regression? Yes, it's a regression. I hadn't seen your note when I wrote the above. I believe http://article.gmane.org/gmane.comp.emulators.qemu/210976 fixes the problem without eliminating any checking. > I still have to compare to 1.4, but it's not very fair, as a > significant work has been but on TCG to improve the performances, > especially on the target-ppc code. > > I am currently preparing an image so that people can test that > themselves. I can reproduce large numbers of casts FWIW so no need to on my end. I've confirmed the above patch fixes it. >> Disabling casts doesn't give us a long term fix. One of the solutions >> above does and patches also exist. > > Why do you insist on using dynamic cast, on a hot path? It's a question of safety. > It was using a > simple pointer before QOM in 1.4, it won't be less safe with if we use > a static cast instead of a dynamic one in 1.5. The patch I posted should make it equally fast. > With your arguments, we should drop all dataplane code, as it doesn't > use the QEMU core code. People should just not complain about the > performance. No one is complaining about performance. I merely stated that if performance is a problem, give us a chance to fix it before completely disabling a feature. And indeed, now I have a fix that doesn't disable anything. Regards, Anthony Liguori > > -- > Aurelien Jarno GPG: 1024D/F1BCDB73 > aurelien@aurel32.net http://www.aurel32.net