Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754208AbbDQJr4 (ORCPT ); Fri, 17 Apr 2015 05:47:56 -0400 Received: from foss.arm.com ([217.140.101.70]:39690 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391AbbDQJrx (ORCPT ); Fri, 17 Apr 2015 05:47:53 -0400 Date: Fri, 17 Apr 2015 10:47:48 +0100 From: Mark Rutland To: Andi Kleen Cc: Kan Liang , "acme@kernel.org" , "a.p.zijlstra@chello.nl" , "eranian@google.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V2 1/6] perf,core: allow invalid context events to be part of sw/hw groups Message-ID: <20150417094746.GA21655@leverpostej> References: <1429084576-1078-1-git-send-email-kan.liang@intel.com> <20150416163140.GA19775@leverpostej> <20150416212342.GW2366@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150416212342.GW2366@two.firstfloor.org> Thread-Topic: [PATCH V2 1/6] perf,core: allow invalid context events to be part of sw/hw groups Accept-Language: en-GB, en-US Content-Language: en-US User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 33 On Thu, Apr 16, 2015 at 10:23:42PM +0100, Andi Kleen wrote: > > From my PoV that makes sense. One is CPU-affine, the other is not, and > > the two cannot be scheduled in the same PMU transaction by the nature of > > the hardware. Fundamentally, you cannot provide group semantics due to > > this. > > Actually you can. Just use it like a free running counter, and the > different groups sample it. This will work from the different CPUs, > as long as the event is the same everywhere. ... which would give you arbitrary skew, because one counter is free-running and the other is not (when scheduling a context in or out we stop the PMU) >From my PoV that violates group semantics, because now the events aren't always counting at the same time (which would be the reason I grouped them in the first place). > The implemention may not be quite right yet, but the basic concept > should work, and is useful. I can see that associating counts from different PMUs at points in time may be useful, even if they aren't sampled at the precise same time, and you have weaker guarantees than the current group semantics. However, it is the case that you cannot offer group semantics. Mark. -- 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/