From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ub4is-0006V3-TW for qemu-devel@nongnu.org; Sat, 11 May 2013 04:00:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ub4ir-00045n-L1 for qemu-devel@nongnu.org; Sat, 11 May 2013 04:00:06 -0400 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:37307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ub4ir-00043Y-Ef for qemu-devel@nongnu.org; Sat, 11 May 2013 04:00:05 -0400 Received: by mail-ea0-f182.google.com with SMTP id z16so2563307ead.27 for ; Sat, 11 May 2013 01:00:04 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <518DFA70.3090404@redhat.com> Date: Sat, 11 May 2013 09:59:44 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> <518D5FAA.5050507@redhat.com> <8738tu5taq.fsf@codemonkey.ws> In-Reply-To: <8738tu5taq.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: qemu-devel , "Michael S. Tsirkin" , Aurelien Jarno , =?ISO-8859-1?Q?Andreas_F=E4rber?= , Anthony Liguori Il 11/05/2013 01:06, Anthony Liguori ha scritto: > The thing is, none of these casts should be for more than 1 level and > the patch I provided makes those casts almost free. Assuming strings are collapsed (and that's why my original attempt to introduce the fast path only looked at the concrete classes: I was trying to optimize it within a device model). > I believe the reason it didn't fix the problem for Aurelien is because > the string addresses were different because of different compilation > units. I guess binutils doesn't collapse strings when linking. No, it doesn't. GCC can do that if you use link-time optimization, but binutils doesn't look into the data section. It is a black box. >>> As soon as we open up 1.6 for development, we face an immediate >>> regression in performance. So we need to fix the real problem here >>> anyway. >> >> No, we don't. We will simply have to live with a debugging vs. >> production tradeoff. > > I appreciate all of the arguments below. I'm very concerned about > reducing safety checks but am sympathetic to performance concerns. > > Here's what I would like to do. I'll apply 1-6 of your series which > gives us the infrastructure to disable qom casts. That at least let's > the code get tested in case we need it. Fair enough, thanks! Are you going to replace patch 3 with yours? (Though I don't think we need to check the parent, see above). > I will hold off applying patch 7 hoping that the patch I provided to > Aurelien solves the problem. If it doesn't and we're unable to find a > better solution, I'll apply patch 7 for the release. Let's please test virtio-net as well, it looks like Aurelien has the benchmark. /me goes swimming now. :) Paolo