From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaoDB-0005EO-Pw for qemu-devel@nongnu.org; Fri, 10 May 2013 10:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaoD8-0002Fl-Gn for qemu-devel@nongnu.org; Fri, 10 May 2013 10:22:17 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:40443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaoD8-0002F2-BQ for qemu-devel@nongnu.org; Fri, 10 May 2013 10:22:14 -0400 Date: Fri, 10 May 2013 16:22:08 +0200 From: Aurelien Jarno Message-ID: <20130510142208.GD19954@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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <518CF669.30803@redhat.com> 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: Paolo Bonzini Cc: Anthony Liguori , mst@redhat.com, Andreas =?iso-8859-15?Q?F=E4rber?= , qemu-devel@nongnu.org On Fri, May 10, 2013 at 03:30:17PM +0200, Paolo Bonzini wrote: > Il 10/05/2013 15:23, Andreas Färber ha scritto: > > Am 10.05.2013 15:08, schrieb Paolo Bonzini: > >> Il 10/05/2013 15:01, Anthony Liguori ha scritto: > >>> I'd prefer not to disable but instead focus on improving performance. > >> > >> For 1.5? This is a regression in 1.5 due to more and more usage of > >> foo_env_on_cpu. > > > > If CPUs were the only reason, we could simply change those inlines and > > ENV_GET_CPU() macro to use a C cast. No complicated interface scenarios > > requiring a dynamic cast are used for CPUs so far to my knowledge. > > Almost nothing really requires a dynamic cast in QEMU. Only interface > casts do, and there's just a couple of uses of interfaces. > > And I wrote in the cover letter that what I want is really avoid the > need for "fast casts" in the hot paths. > > Can you guys actually read the commit messages? > > > Either way, it would be nice to see the call sites of those > > most-impacting dynamic casts! So far I held back my APIC RFC since I'm > > not sure how to reproducibly profile things. > > It's interrupts (both sending and returning from them). > More precisely in target-ppc/excp_helper.c: - in ppc_hw_interrupt - in helper_store_msr - in do_rfi (called from helper_rfi) - in helper_msgsnd Sot it's at least twice per interruption, which means doing hash table lookup and string comparison through glib a few hundred to a few thousand times per second. Before the QOMification, it was a simple pointer access. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net