From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758893AbcHDR2J (ORCPT ); Thu, 4 Aug 2016 13:28:09 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:53104 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758831AbcHDR2G (ORCPT ); Thu, 4 Aug 2016 13:28:06 -0400 Date: Thu, 4 Aug 2016 19:27:07 +0200 From: Peter Zijlstra To: David Carrillo-Cisneros Cc: linux-kernel , "x86@kernel.org" , Ingo Molnar , Thomas Gleixner , Andi Kleen , Kan Liang , Paul Turner , Stephane Eranian Subject: Re: [PATCH 2/3] perf/core: introduce pmu_event_flags and PMUEF_READ_CPU_PKG Message-ID: <20160804172707.GQ6879@twins.programming.kicks-ass.net> References: <1470105895-71379-1-git-send-email-davidcc@google.com> <1470105895-71379-3-git-send-email-davidcc@google.com> <20160804150038.GQ6862@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 04, 2016 at 10:23:43AM -0700, David Carrillo-Cisneros wrote: > >> Introduce the flag PMUEF_READ_CPU_PKG, useful for uncore events, that > >> allows a PMU to signal the generic perf code that an event is readable > >> on the current CPU if the event is: > >> - active in a CPU in the same package as the current CPU (local CPU) > > > > Ok that I get.. > > > >> - not active but is attached to a CPU (i.e. event->cpu != -1) in the > >> same package as the current CPU. > > > > but this, not so much. Why would you want to read an inactive counter? > > Uncore counters are active even if its event is not. Not in general they are not, and if they are (freerunning msr counters for example) we should not include the counts when the event is inactive.