From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper Date: Mon, 30 May 2011 21:32:53 +0200 Message-ID: <20110530193253.GA5707@elte.hu> References: <4DE381DB.8040804@redhat.com> <20110530114949.GD22324@elte.hu> <1306756681.14564.95.camel@lappy> <20110530122027.GJ22324@elte.hu> <4DE38C50.404@redhat.com> <20110530141058.GA12360@elte.hu> <4DE3A9E8.4010307@redhat.com> <20110530144303.GA13966@elte.hu> <4DE3AED3.7070405@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sasha Levin , Pekka Enberg , Takuya Yoshikawa , kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com, "Paul E. McKenney" , takuya.yoshikawa@gmail.com To: Avi Kivity Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:46421 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752885Ab1E3TdO (ORCPT ); Mon, 30 May 2011 15:33:14 -0400 Content-Disposition: inline In-Reply-To: <4DE3AED3.7070405@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: * Avi Kivity wrote: > > Also, a profile of a typical kernel build shows: > > > > 0.69% cc1 [kernel.kallsyms] [k] clear_page_c > > 0.49% cc1 [kernel.kallsyms] [k] page_fault > > > > So while we could improve it, the question is, can we do this without > > accidentally slowing things down by more than 0.69%? And kernel > > builds are a pretty clear_page_c() intense workload. > > I usually see much higher clear_page_c, but I'm using a pretty old > system for most of my testing. Well, clear_page_c() is still the most expensive kernel function. I'd suggest using a modern system *and* using percise PEBS profiling via perf record -e cycles:pp - otherwise it's easy to see profiling artifacts, especially in and around short functions like clear_page_c(). Thanks, Ingo