From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758709AbcHDPkq (ORCPT ); Thu, 4 Aug 2016 11:40:46 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47291 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbcHDPko (ORCPT ); Thu, 4 Aug 2016 11:40:44 -0400 Date: Thu, 4 Aug 2016 17:11:02 +0200 From: Peter Zijlstra To: David Carrillo-Cisneros Cc: linux-kernel@vger.kernel.org, "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: <20160804151102.GR6862@twins.programming.kicks-ass.net> References: <1470105895-71379-1-git-send-email-davidcc@google.com> <1470105895-71379-3-git-send-email-davidcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1470105895-71379-3-git-send-email-davidcc@google.com> 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 Mon, Aug 01, 2016 at 07:44:54PM -0700, David Carrillo-Cisneros wrote: > +/* > + * Flags for pmu_event_flags. > + * > + * PMUEF_READ_CPU_PKG: A CPU event (or cgroup event) that can be read in > + * any CPU in event->cpu's package, even if inactive. > + */ > +#define PMUEF_READ_CPU_PKG BIT(0) So I don't object to the idea, but this flags thing seems somewhat awkward to express 'random' topology constraints. For example, the AMD Fam15 NB driver could use something similar, but I'm not sure their NB-id matches our topo package id.