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

Peter Zijlstra
2016-08-04T15:40:46Z

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.