Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [RFC][PATCH] perf: sysfs type id | From | Michael Ellerman <> | Date | Wed, 10 Nov 2010 10:36:51 +1100 |
| |
On Tue, 2010-11-09 at 14:13 -0800, Greg KH wrote: > On Tue, Nov 09, 2010 at 10:45:19PM +0100, Peter Zijlstra 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/ > > You missed the embedded track at Plumbers where we talked about never > adding another class to the kernel. Please use bus_id instead for this.
At least in the examples I've seen creating a bus requires a lot more code than a class. Or is there a shortcut I don't know about when it's a virtual bus?
(Interested because I have code that is using a class)
cheers
[unhandled content-type:application/pgp-signature] | ![\](/images/icornerr.gif) |