Re: [PATCH 02/10] x86, perf: Support sysfs files depending on SMT status

From: Peter Zijlstra
Date: Mon May 09 2016 - 10:34:28 EST


On Mon, May 09, 2016 at 07:27:41AM -0700, Andi Kleen wrote:
> On Mon, May 09, 2016 at 11:42:19AM +0200, Peter Zijlstra wrote:
> > On Thu, May 05, 2016 at 04:03:59PM -0700, Andi Kleen wrote:
> > > From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> > >
> > > Add a way to show different sysfs events attributes depending on
> > > HyperThreading is on or off. This is difficult to determine
> > > early at boot, so we just do it dynamically when the sysfs
> > > attribute is read.
> > >
> > > v2:
> > > Compute HT status only once in CPU online/offline hooks.
> > > v3: Use topology_max_smt_threads()
> > > Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> > > ---
> > > arch/x86/events/core.c | 24 ++++++++++++++++++++++++
> > > arch/x86/events/perf_event.h | 14 ++++++++++++++
> > > include/linux/perf_event.h | 7 +++++++
> > > 3 files changed, 45 insertions(+)
> > >
> >
> > Should this not now live in /sys/devices/system/cpu/ ? Thomas?
>
> This would be incompatible to all previous perf tools.
>
> Also not clear why you would want to move such events, just
> because they depend on SMT.

Durr, my bad; I read the patch wrong. I'll go have another look.

Thanks