Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758470AbZCMNNl (ORCPT ); Fri, 13 Mar 2009 09:13:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757072AbZCMNNa (ORCPT ); Fri, 13 Mar 2009 09:13:30 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:50142 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751624AbZCMNN3 (ORCPT ); Fri, 13 Mar 2009 09:13:29 -0400 Date: Fri, 13 Mar 2009 14:13:09 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: Paul Mackerras , linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [PATCH] perfcounters: Make s/w counters in a group only count when group is on Message-ID: <20090313131309.GB10117@elte.hu> References: <18873.48668.562126.113618@cargo.ozlabs.ibm.com> <1236939816.22914.3714.camel@twins> <18874.20538.785519.824803@cargo.ozlabs.ibm.com> <1236948283.22447.36.camel@twins> <1236949440.5188.709.camel@laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1236949440.5188.709.camel@laptop> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean 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.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1553 Lines: 43 * Peter Zijlstra wrote: > On Fri, 2009-03-13 at 13:44 +0100, Peter Zijlstra wrote: > > > The same for task migration, most migrations happen when > > they are in fact running, so there too we can account the > > migration either before we rip it off the src cpu, or after > > we place it on the dst cpu. > > Right, I got confused between being on the cpu and having > ->state = R. > > Migrations are the odd one out indeed, but I'd rather fudge a > little with the migration counter itself than have this weird > asymmetry. Agreed. There should really be no difference between software and hardware counters as far as the generic perfcounters code goes. It's a magic "metric" that gets read out somehow, and which generates events somehow. We can have various grades of hardware versus software counters: - 'pure hardware counters' where both the count and events come from some hw register - 'pure software counters' where both the count and events are generated by software - 'hybride counters' where for example the count might be from a hardware register, but the event is generated by a hrtimer (because the hardware is not capable of generating events). the is_software_counter() assymetry broke this generally relaxed model of counters. 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/