Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757933AbZF0R3O (ORCPT ); Sat, 27 Jun 2009 13:29:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755410AbZF0R27 (ORCPT ); Sat, 27 Jun 2009 13:28:59 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:34691 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756738AbZF0R26 (ORCPT ); Sat, 27 Jun 2009 13:28:58 -0400 Date: Sat, 27 Jun 2009 19:28:54 +0200 From: Ingo Molnar To: Paul Mackerras Cc: Vince Weaver , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: performance counter ~0.4% error finding retired instruction count Message-ID: <20090627172854.GE21595@elte.hu> References: <20090624151010.GA12799@elte.hu> <20090627060432.GB16200@elte.hu> <19013.49344.860564.948905@cargo.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19013.49344.860564.948905@cargo.ozlabs.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0001] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 911 Lines: 25 * Paul Mackerras wrote: > Ingo Molnar writes: > > > I measured 2000, but generally a few thousand cycles per > > invocation sounds about right. > > We could actually do a bit better than we do, fairly easily. We > could attach the counters to the child after the fork instead of > the parent before the fork, using a couple of pipes for > synchronization. And there's probably a way to get the dynamic > linker to resolve the execvp call early in the child so we avoid > that overhead. I think we should be able to get the overhead down > to tens of userspace instructions without doing anything > unnatural. Definitely so. Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/