lkml.org 
[lkml]   [2010]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 3/9] perf: export registerred pmus via sysfs
From
Date
On Mon, 2010-05-10 at 18:18 +0800, Peter Zijlstra wrote:
> On Mon, 2010-05-10 at 18:11 +0800, Lin Ming wrote:
> > On Mon, 2010-05-10 at 17:40 +0800, Peter Zijlstra wrote:
> > > On Mon, 2010-05-10 at 17:27 +0800, Lin Ming wrote:
> > > > Export pmus via sysfs /sys/devices/system/cpu/pmus/0...N
> > > > The file name is the pmu id, ie, /sys/devices/system/cpu/pmus/N
> > > > represents pmu id N.
> > > > So perf tool can use it to initialize perf_event_attr.
> > >
> > > Why create a whole new directory, why not:
> > >
> > > /sys/devices/system/cpu/cpuN/pmu_id ?
> >
> >
> > Do you mean /sys/devices/system/cpu/cpuN/pmu_id contain all ids?
> >
> > For example, each cpu has 4 pmus and the file pmu_id shows something
> > like,
> >
> > #cat /sys/devices/system/cpu/cpu0/pmu_id
> > 0 1 2 3
>
> No, I'm assuming there is only 1 PMU per CPU. Corey is the expert on
> crazy hardware though, but I think the sanest way is to extend the CPU
> topology if there's more structure to it.

But our goal is to support multiple pmus, don't we need to assume there
are more than 1 PMU per CPU?

>
> It simply doesn't make sense to have multiple PMU IDs on a single
> topology entry, how would you choose?

How about
/sys/devices/system/cpu/cpuN/pmu_0
/sys/devices/system/cpu/cpuN/pmu_1
/sys/devices/system/cpu/cpuN/pmu_2
/sys/devices/system/cpu/cpuN/pmu_3
....?




\
 
 \ /
  Last update: 2010-05-10 12:29    [W:0.107 / U:10.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site