Re: [PATCH 2/3] perf/core: introduce pmu_event_flags and PMUEF_READ_CPU_PKG

From: Peter Zijlstra
Date: Thu Aug 04 2016 - 11:40:49 EST


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.