Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755917AbbGQSLT (ORCPT ); Fri, 17 Jul 2015 14:11:19 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:38903 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755441AbbGQSLR (ORCPT ); Fri, 17 Jul 2015 14:11:17 -0400 MIME-Version: 1.0 In-Reply-To: <20150717125549.GJ19282@twins.programming.kicks-ass.net> References: <1437078831-10152-1-git-send-email-kan.liang@intel.com> <1437078831-10152-5-git-send-email-kan.liang@intel.com> <20150717122105.GD26091@leverpostej> <20150717125549.GJ19282@twins.programming.kicks-ass.net> Date: Fri, 17 Jul 2015 11:11:15 -0700 Message-ID: Subject: Re: [PATCH 4/9] perf/x86: special case per-cpu core misc PMU events From: Stephane Eranian To: Peter Zijlstra Cc: Mark Rutland , "kan.liang@intel.com" , "mingo@redhat.com" , "acme@kernel.org" , "ak@linux.intel.com" , "adrian.hunter@intel.com" , "dsahern@gmail.com" , "jolsa@kernel.org" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 979 Lines: 25 Hi, On Fri, Jul 17, 2015 at 5:55 AM, Peter Zijlstra wrote: > On Fri, Jul 17, 2015 at 01:21:06PM +0100, Mark Rutland wrote: >> >> As with my earlier comments, I don't think these can be grouped with >> events (not even from the same PMU given their free-running nature). >> >> They're CPU-affine, so you can associate them with work done on that >> CPU. > > Just record the deltas from them while you're on. Yes, free-running are already handled by the kernel, the RAPL counters are a good example. The uncore IMC counters (for SNB/IVB/HSW/BDW) client processors is another example. Just compute deltas, and make sure you do not miss a wrap-around of the counter if it is not wide enough to never wrap-around. -- 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/