lkml.org 
[lkml]   [2010]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH] perf: sysfs type id
From
Date
On Tue, 2010-11-09 at 23:11 +0100, Kay Sievers wrote:
> On Tue, Nov 9, 2010 at 22:45, Peter Zijlstra <peterz@infradead.org> wrote:
> > The below is a RFC patch adding dynamic type ids to perf.
> >
> > We need to represent PMUs in sysfs because we want to allow multiple
> > (loadable) PMUs and need a way to identify them.
> >
> > This patch creates a new device class "pmu" and adds a single attribute
> > "type" to it. This device attribute will expose the dynamic type id as
> > required by perf_event_attr::type.
> >
> > The sysfs layout looks like:
> >
> > [root@westmere ~]# cd /sys/class/pmu/
>
> Please use a 'bus_type' instead of 'class'.
>
> I'm very sure, some day, you'll need global attributes for the pmu
> stuff, and class -- unlike bus -- has its own subdir where you can go
> wild, without mixing things with the list-of-devices. :)

Having its own subdir sounds like a pro, so I'm somewhat confused. Also
the pmu (or event_source as Ingo would like it getting called) seems
like a class of devices not a bus.

USB/PCI/I2C/ISA are all buses.. pmu/event_source not so much, they are
very different (sometimes even pure software) things that provide a
common interface -- they generate events which we can count and sample.

/me dazed & confused, please do explain.

> No new stuff should use 'class', it's not extensible.

Hrm.. when I introduced the bdi stuff class was _the_ thing to use.


\
 
 \ /
  Last update: 2010-11-09 23:25    [W:0.152 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site