Messages in this thread | | | From | Kay Sievers <> | Date | Tue, 9 Nov 2010 23:11:17 +0100 | Subject | Re: [RFC][PATCH] perf: sysfs type id |
| |
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. :)
No new stuff should use 'class', it's not extensible.
Kay
| |