* [RFC PATCH v2] perf Documentation: Describe the PMU naming convention
@ 2024-06-06 4:49 Ian Rogers
2024-06-06 9:33 ` James Clark
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Ian Rogers @ 2024-06-06 4:49 UTC (permalink / raw)
To: Randy Dunlap, Tuan Phan, Robin Murphy, Thomas Richter,
Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
Kan Liang, James Clark, Ravi Bangoria, linux-perf-users,
linux-kernel, Will Deacon, Stephane Eranian
It is an existing convention to use suffixes with PMU names. Try to
capture that convention so that future PMU devices may adhere to it.
The name of the file and date within the file try to follow existing
conventions, particularly sysfs-bus-event_source-devices-events.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
---
.../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices b/Documentation/ABI/testing/sysfs-bus-event_source-devices
new file mode 100644
index 000000000000..79b268319df1
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices
@@ -0,0 +1,24 @@
+What: /sys/bus/event_source/devices/<pmu>
+Date: 2014/02/24
+Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
+Description: Performance Monitoring Unit (<pmu>)
+
+ Each <pmu> directory, for a PMU device, is a name
+ optionally followed by an underscore and then either a
+ decimal or hexadecimal number. For example, cpu is a
+ PMU name without a suffix as is intel_bts,
+ uncore_imc_0 is a PMU name with a 0 numeric suffix,
+ ddr_pmu_87e1b0000000 is a PMU name with a hex
+ suffix. The hex suffix must be more than two
+ characters long to avoid ambiguity with PMUs like the
+ S390 cpum_cf.
+
+ Tools can treat PMUs with the same name that differ by
+ suffix as instances of the same PMU for the sake of,
+ for example, opening an event. For example, the PMUs
+ uncore_imc_free_running_0 and
+ uncore_imc_free_running_1 have an event data_read;
+ opening the data_read event on a PMU specified as
+ uncore_imc_free_running should be treated as opening
+ the data_read event on PMU uncore_imc_free_running_0
+ and PMU uncore_imc_free_running_1.
--
2.45.1.467.gbab1589fc0-goog
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-06-06 4:49 [RFC PATCH v2] perf Documentation: Describe the PMU naming convention Ian Rogers @ 2024-06-06 9:33 ` James Clark 2024-06-06 16:10 ` Leo Yan 2024-06-06 18:14 ` Liang, Kan 2 siblings, 0 replies; 10+ messages in thread From: James Clark @ 2024-06-06 9:33 UTC (permalink / raw) To: Ian Rogers Cc: Randy Dunlap, Tuan Phan, Robin Murphy, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On 06/06/2024 05:49, Ian Rogers wrote: > It is an existing convention to use suffixes with PMU names. Try to > capture that convention so that future PMU devices may adhere to it. > > The name of the file and date within the file try to follow existing > conventions, particularly sysfs-bus-event_source-devices-events. > > Signed-off-by: Ian Rogers <irogers@google.com> > Reviewed-by: Randy Dunlap <rdunlap@infradead.org> > --- > .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ > 1 file changed, 24 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices > > diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices b/Documentation/ABI/testing/sysfs-bus-event_source-devices > new file mode 100644 > index 000000000000..79b268319df1 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices > @@ -0,0 +1,24 @@ > +What: /sys/bus/event_source/devices/<pmu> > +Date: 2014/02/24 > +Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> > +Description: Performance Monitoring Unit (<pmu>) > + > + Each <pmu> directory, for a PMU device, is a name > + optionally followed by an underscore and then either a > + decimal or hexadecimal number. For example, cpu is a > + PMU name without a suffix as is intel_bts, > + uncore_imc_0 is a PMU name with a 0 numeric suffix, > + ddr_pmu_87e1b0000000 is a PMU name with a hex > + suffix. The hex suffix must be more than two > + characters long to avoid ambiguity with PMUs like the > + S390 cpum_cf. > + > + Tools can treat PMUs with the same name that differ by > + suffix as instances of the same PMU for the sake of, > + for example, opening an event. For example, the PMUs > + uncore_imc_free_running_0 and > + uncore_imc_free_running_1 have an event data_read; > + opening the data_read event on a PMU specified as > + uncore_imc_free_running should be treated as opening > + the data_read event on PMU uncore_imc_free_running_0 > + and PMU uncore_imc_free_running_1. Reviewed-by: James Clark <james.clark@arm.com> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-06-06 4:49 [RFC PATCH v2] perf Documentation: Describe the PMU naming convention Ian Rogers 2024-06-06 9:33 ` James Clark @ 2024-06-06 16:10 ` Leo Yan 2024-06-06 18:14 ` Liang, Kan 2 siblings, 0 replies; 10+ messages in thread From: Leo Yan @ 2024-06-06 16:10 UTC (permalink / raw) To: Ian Rogers, Randy Dunlap, Tuan Phan, Robin Murphy, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On 6/6/24 05:49, Ian Rogers wrote: > It is an existing convention to use suffixes with PMU names. Try to > capture that convention so that future PMU devices may adhere to it. > > The name of the file and date within the file try to follow existing > conventions, particularly sysfs-bus-event_source-devices-events. > > Signed-off-by: Ian Rogers <irogers@google.com> > Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Leo Yan <leo.yan@arm.com> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-06-06 4:49 [RFC PATCH v2] perf Documentation: Describe the PMU naming convention Ian Rogers 2024-06-06 9:33 ` James Clark 2024-06-06 16:10 ` Leo Yan @ 2024-06-06 18:14 ` Liang, Kan 2024-10-23 4:06 ` Ian Rogers 2 siblings, 1 reply; 10+ messages in thread From: Liang, Kan @ 2024-06-06 18:14 UTC (permalink / raw) To: Ian Rogers, Randy Dunlap, Tuan Phan, Robin Murphy, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On 2024-06-06 12:49 a.m., Ian Rogers wrote: > It is an existing convention to use suffixes with PMU names. Try to > capture that convention so that future PMU devices may adhere to it. > > The name of the file and date within the file try to follow existing > conventions, particularly sysfs-bus-event_source-devices-events. > > Signed-off-by: Ian Rogers <irogers@google.com> > Reviewed-by: Randy Dunlap <rdunlap@infradead.org> > --- > .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ > 1 file changed, 24 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices > Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Thanks, Kan > diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices b/Documentation/ABI/testing/sysfs-bus-event_source-devices > new file mode 100644 > index 000000000000..79b268319df1 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices > @@ -0,0 +1,24 @@ > +What: /sys/bus/event_source/devices/<pmu> > +Date: 2014/02/24 > +Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> > +Description: Performance Monitoring Unit (<pmu>) > + > + Each <pmu> directory, for a PMU device, is a name > + optionally followed by an underscore and then either a > + decimal or hexadecimal number. For example, cpu is a > + PMU name without a suffix as is intel_bts, > + uncore_imc_0 is a PMU name with a 0 numeric suffix, > + ddr_pmu_87e1b0000000 is a PMU name with a hex > + suffix. The hex suffix must be more than two > + characters long to avoid ambiguity with PMUs like the > + S390 cpum_cf. > + > + Tools can treat PMUs with the same name that differ by > + suffix as instances of the same PMU for the sake of, > + for example, opening an event. For example, the PMUs > + uncore_imc_free_running_0 and > + uncore_imc_free_running_1 have an event data_read; > + opening the data_read event on a PMU specified as > + uncore_imc_free_running should be treated as opening > + the data_read event on PMU uncore_imc_free_running_0 > + and PMU uncore_imc_free_running_1. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-06-06 18:14 ` Liang, Kan @ 2024-10-23 4:06 ` Ian Rogers 2024-10-23 9:33 ` Robin Murphy 0 siblings, 1 reply; 10+ messages in thread From: Ian Rogers @ 2024-10-23 4:06 UTC (permalink / raw) To: Liang, Kan Cc: Randy Dunlap, Tuan Phan, Robin Murphy, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On Thu, Jun 6, 2024 at 11:15 AM Liang, Kan <kan.liang@linux.intel.com> wrote: > > > > On 2024-06-06 12:49 a.m., Ian Rogers wrote: > > It is an existing convention to use suffixes with PMU names. Try to > > capture that convention so that future PMU devices may adhere to it. > > > > The name of the file and date within the file try to follow existing > > conventions, particularly sysfs-bus-event_source-devices-events. > > > > Signed-off-by: Ian Rogers <irogers@google.com> > > Reviewed-by: Randy Dunlap <rdunlap@infradead.org> > > --- > > .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ > > 1 file changed, 24 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices > > > > Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Thanks for all the reviews. Could we land this? Thanks, Ian > > diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices b/Documentation/ABI/testing/sysfs-bus-event_source-devices > > new file mode 100644 > > index 000000000000..79b268319df1 > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices > > @@ -0,0 +1,24 @@ > > +What: /sys/bus/event_source/devices/<pmu> > > +Date: 2014/02/24 > > +Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> > > +Description: Performance Monitoring Unit (<pmu>) > > + > > + Each <pmu> directory, for a PMU device, is a name > > + optionally followed by an underscore and then either a > > + decimal or hexadecimal number. For example, cpu is a > > + PMU name without a suffix as is intel_bts, > > + uncore_imc_0 is a PMU name with a 0 numeric suffix, > > + ddr_pmu_87e1b0000000 is a PMU name with a hex > > + suffix. The hex suffix must be more than two > > + characters long to avoid ambiguity with PMUs like the > > + S390 cpum_cf. > > + > > + Tools can treat PMUs with the same name that differ by > > + suffix as instances of the same PMU for the sake of, > > + for example, opening an event. For example, the PMUs > > + uncore_imc_free_running_0 and > > + uncore_imc_free_running_1 have an event data_read; > > + opening the data_read event on a PMU specified as > > + uncore_imc_free_running should be treated as opening > > + the data_read event on PMU uncore_imc_free_running_0 > > + and PMU uncore_imc_free_running_1. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-10-23 4:06 ` Ian Rogers @ 2024-10-23 9:33 ` Robin Murphy 2024-10-23 16:21 ` Ian Rogers 0 siblings, 1 reply; 10+ messages in thread From: Robin Murphy @ 2024-10-23 9:33 UTC (permalink / raw) To: Ian Rogers, Liang, Kan Cc: Randy Dunlap, Tuan Phan, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On 2024-10-23 5:06 am, Ian Rogers wrote: > On Thu, Jun 6, 2024 at 11:15 AM Liang, Kan <kan.liang@linux.intel.com> wrote: >> >> >> >> On 2024-06-06 12:49 a.m., Ian Rogers wrote: >>> It is an existing convention to use suffixes with PMU names. Try to >>> capture that convention so that future PMU devices may adhere to it. >>> >>> The name of the file and date within the file try to follow existing >>> conventions, particularly sysfs-bus-event_source-devices-events. >>> >>> Signed-off-by: Ian Rogers <irogers@google.com> >>> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> >>> --- >>> .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ >>> 1 file changed, 24 insertions(+) >>> create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices >>> >> >> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> > > Thanks for all the reviews. Could we land this? Hmm, it's not always going to be strictly true as written though - we will also have cases where multiple PMU instances owned by the same driver don't all support the same events/filters/etc., and/or are entirely unrelated such that the same event encoding may mean completely different things. I've just landed a driver where not only are the instances going to be heterogeneous (since it's for arbitrary bits of interconnect), but for hierarchy reasons the most logical place to put the instance ID in the name wasn't even at the end :( FWIW I think if we want to nail down a strict ABI, it would seem more robust to have an explicit attribute to describe underlying PMU properties like whether instances do represent identical "slices" or not. The hex suffix thing is already proving how fragile names alone are liable to be. Thanks, Robin. > > Thanks, > Ian > >>> diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices b/Documentation/ABI/testing/sysfs-bus-event_source-devices >>> new file mode 100644 >>> index 000000000000..79b268319df1 >>> --- /dev/null >>> +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices >>> @@ -0,0 +1,24 @@ >>> +What: /sys/bus/event_source/devices/<pmu> >>> +Date: 2014/02/24 >>> +Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> >>> +Description: Performance Monitoring Unit (<pmu>) >>> + >>> + Each <pmu> directory, for a PMU device, is a name >>> + optionally followed by an underscore and then either a >>> + decimal or hexadecimal number. For example, cpu is a >>> + PMU name without a suffix as is intel_bts, >>> + uncore_imc_0 is a PMU name with a 0 numeric suffix, >>> + ddr_pmu_87e1b0000000 is a PMU name with a hex >>> + suffix. The hex suffix must be more than two >>> + characters long to avoid ambiguity with PMUs like the >>> + S390 cpum_cf. >>> + >>> + Tools can treat PMUs with the same name that differ by >>> + suffix as instances of the same PMU for the sake of, >>> + for example, opening an event. For example, the PMUs >>> + uncore_imc_free_running_0 and >>> + uncore_imc_free_running_1 have an event data_read; >>> + opening the data_read event on a PMU specified as >>> + uncore_imc_free_running should be treated as opening >>> + the data_read event on PMU uncore_imc_free_running_0 >>> + and PMU uncore_imc_free_running_1. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-10-23 9:33 ` Robin Murphy @ 2024-10-23 16:21 ` Ian Rogers 2024-12-20 19:16 ` Ian Rogers 0 siblings, 1 reply; 10+ messages in thread From: Ian Rogers @ 2024-10-23 16:21 UTC (permalink / raw) To: Robin Murphy Cc: Liang, Kan, Randy Dunlap, Tuan Phan, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On Wed, Oct 23, 2024 at 2:34 AM Robin Murphy <robin.murphy@arm.com> wrote: > > On 2024-10-23 5:06 am, Ian Rogers wrote: > > On Thu, Jun 6, 2024 at 11:15 AM Liang, Kan <kan.liang@linux.intel.com> wrote: > >> > >> > >> > >> On 2024-06-06 12:49 a.m., Ian Rogers wrote: > >>> It is an existing convention to use suffixes with PMU names. Try to > >>> capture that convention so that future PMU devices may adhere to it. > >>> > >>> The name of the file and date within the file try to follow existing > >>> conventions, particularly sysfs-bus-event_source-devices-events. > >>> > >>> Signed-off-by: Ian Rogers <irogers@google.com> > >>> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> > >>> --- > >>> .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ > >>> 1 file changed, 24 insertions(+) > >>> create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices > >>> > >> > >> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> > > > > Thanks for all the reviews. Could we land this? > > Hmm, it's not always going to be strictly true as written though - we > will also have cases where multiple PMU instances owned by the same > driver don't all support the same events/filters/etc., and/or are > entirely unrelated such that the same event encoding may mean completely > different things. I've just landed a driver where not only are the > instances going to be heterogeneous (since it's for arbitrary bits of > interconnect), but for hierarchy reasons the most logical place to put > the instance ID in the name wasn't even at the end :( Right, I was trying to capture what the tool is doing and trying to encompass the problems hex suffix create. Another example of that problem recently burning us is ARM's PMU naming of armv8_pmuv3_a53 means the a53 looks like a hex suffix. When ARM release a model with a 3 digit number will the naming break? Wrt filters, I wonder if there should be testing, bugs, etc. The wildcard matching will likely do its thing and I think the failures should be predictable and descriptive, like an event used a format that a PMU doesn't support, but I'm not sure if we should do improvements in `perf list` where we try to deduplicate PMUs. Perhaps the deduplication should be smarter. > FWIW I think if we want to nail down a strict ABI, it would seem more > robust to have an explicit attribute to describe underlying PMU > properties like whether instances do represent identical "slices" or > not. The hex suffix thing is already proving how fragile names alone are > liable to be. Agreed. Does this mean we shouldn't land this? I worry that LKML is the home of bike shedding conversations and we're likely to bike shed trying to achieve 'perfect' while something 'good' would have value today. Thanks, Ian > >>> diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices b/Documentation/ABI/testing/sysfs-bus-event_source-devices > >>> new file mode 100644 > >>> index 000000000000..79b268319df1 > >>> --- /dev/null > >>> +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices > >>> @@ -0,0 +1,24 @@ > >>> +What: /sys/bus/event_source/devices/<pmu> > >>> +Date: 2014/02/24 > >>> +Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org> > >>> +Description: Performance Monitoring Unit (<pmu>) > >>> + > >>> + Each <pmu> directory, for a PMU device, is a name > >>> + optionally followed by an underscore and then either a > >>> + decimal or hexadecimal number. For example, cpu is a > >>> + PMU name without a suffix as is intel_bts, > >>> + uncore_imc_0 is a PMU name with a 0 numeric suffix, > >>> + ddr_pmu_87e1b0000000 is a PMU name with a hex > >>> + suffix. The hex suffix must be more than two > >>> + characters long to avoid ambiguity with PMUs like the > >>> + S390 cpum_cf. > >>> + > >>> + Tools can treat PMUs with the same name that differ by > >>> + suffix as instances of the same PMU for the sake of, > >>> + for example, opening an event. For example, the PMUs > >>> + uncore_imc_free_running_0 and > >>> + uncore_imc_free_running_1 have an event data_read; > >>> + opening the data_read event on a PMU specified as > >>> + uncore_imc_free_running should be treated as opening > >>> + the data_read event on PMU uncore_imc_free_running_0 > >>> + and PMU uncore_imc_free_running_1. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-10-23 16:21 ` Ian Rogers @ 2024-12-20 19:16 ` Ian Rogers 2024-12-20 19:42 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 10+ messages in thread From: Ian Rogers @ 2024-12-20 19:16 UTC (permalink / raw) To: Robin Murphy Cc: Liang, Kan, Randy Dunlap, Tuan Phan, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On Wed, Oct 23, 2024 at 9:21 AM Ian Rogers <irogers@google.com> wrote: > > On Wed, Oct 23, 2024 at 2:34 AM Robin Murphy <robin.murphy@arm.com> wrote: > > > > On 2024-10-23 5:06 am, Ian Rogers wrote: > > > On Thu, Jun 6, 2024 at 11:15 AM Liang, Kan <kan.liang@linux.intel.com> wrote: > > >> > > >> > > >> > > >> On 2024-06-06 12:49 a.m., Ian Rogers wrote: > > >>> It is an existing convention to use suffixes with PMU names. Try to > > >>> capture that convention so that future PMU devices may adhere to it. > > >>> > > >>> The name of the file and date within the file try to follow existing > > >>> conventions, particularly sysfs-bus-event_source-devices-events. > > >>> > > >>> Signed-off-by: Ian Rogers <irogers@google.com> > > >>> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> > > >>> --- > > >>> .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ > > >>> 1 file changed, 24 insertions(+) > > >>> create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices > > >>> > > >> > > >> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> > > > > > > Thanks for all the reviews. Could we land this? > > > > Hmm, it's not always going to be strictly true as written though - we > > will also have cases where multiple PMU instances owned by the same > > driver don't all support the same events/filters/etc., and/or are > > entirely unrelated such that the same event encoding may mean completely > > different things. I've just landed a driver where not only are the > > instances going to be heterogeneous (since it's for arbitrary bits of > > interconnect), but for hierarchy reasons the most logical place to put > > the instance ID in the name wasn't even at the end :( > > Right, I was trying to capture what the tool is doing and trying to > encompass the problems hex suffix create. Another example of that > problem recently burning us is ARM's PMU naming of armv8_pmuv3_a53 > means the a53 looks like a hex suffix. When ARM release a model with a > 3 digit number will the naming break? Wrt filters, I wonder if there > should be testing, bugs, etc. The wildcard matching will likely do its > thing and I think the failures should be predictable and descriptive, > like an event used a format that a PMU doesn't support, but I'm not > sure if we should do improvements in `perf list` where we try to > deduplicate PMUs. Perhaps the deduplication should be smarter. > > > > FWIW I think if we want to nail down a strict ABI, it would seem more > > robust to have an explicit attribute to describe underlying PMU > > properties like whether instances do represent identical "slices" or > > not. The hex suffix thing is already proving how fragile names alone are > > liable to be. > > Agreed. Does this mean we shouldn't land this? I worry that LKML is > the home of bike shedding conversations and we're likely to bike shed > trying to achieve 'perfect' while something 'good' would have value > today. Ping. Thanks, Ian ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-12-20 19:16 ` Ian Rogers @ 2024-12-20 19:42 ` Arnaldo Carvalho de Melo 2025-03-04 13:54 ` James Clark 0 siblings, 1 reply; 10+ messages in thread From: Arnaldo Carvalho de Melo @ 2024-12-20 19:42 UTC (permalink / raw) To: Ian Rogers Cc: Robin Murphy, Liang, Kan, Randy Dunlap, Tuan Phan, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On Fri, Dec 20, 2024 at 11:16:46AM -0800, Ian Rogers wrote: > On Wed, Oct 23, 2024 at 9:21 AM Ian Rogers <irogers@google.com> wrote: > > > > On Wed, Oct 23, 2024 at 2:34 AM Robin Murphy <robin.murphy@arm.com> wrote: > > > > > > On 2024-10-23 5:06 am, Ian Rogers wrote: > > > > On Thu, Jun 6, 2024 at 11:15 AM Liang, Kan <kan.liang@linux.intel.com> wrote: > > > >> > > > >> > > > >> > > > >> On 2024-06-06 12:49 a.m., Ian Rogers wrote: > > > >>> It is an existing convention to use suffixes with PMU names. Try to > > > >>> capture that convention so that future PMU devices may adhere to it. > > > >>> > > > >>> The name of the file and date within the file try to follow existing > > > >>> conventions, particularly sysfs-bus-event_source-devices-events. > > > >>> > > > >>> Signed-off-by: Ian Rogers <irogers@google.com> > > > >>> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> > > > >>> --- > > > >>> .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ > > > >>> 1 file changed, 24 insertions(+) > > > >>> create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices > > > >>> > > > >> > > > >> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> > > > > > > > > Thanks for all the reviews. Could we land this? > > > > > > Hmm, it's not always going to be strictly true as written though - we > > > will also have cases where multiple PMU instances owned by the same > > > driver don't all support the same events/filters/etc., and/or are > > > entirely unrelated such that the same event encoding may mean completely > > > different things. I've just landed a driver where not only are the > > > instances going to be heterogeneous (since it's for arbitrary bits of > > > interconnect), but for hierarchy reasons the most logical place to put > > > the instance ID in the name wasn't even at the end :( > > > > Right, I was trying to capture what the tool is doing and trying to > > encompass the problems hex suffix create. Another example of that > > problem recently burning us is ARM's PMU naming of armv8_pmuv3_a53 > > means the a53 looks like a hex suffix. When ARM release a model with a > > 3 digit number will the naming break? Wrt filters, I wonder if there > > should be testing, bugs, etc. The wildcard matching will likely do its > > thing and I think the failures should be predictable and descriptive, > > like an event used a format that a PMU doesn't support, but I'm not > > sure if we should do improvements in `perf list` where we try to > > deduplicate PMUs. Perhaps the deduplication should be smarter. > > > > > > > FWIW I think if we want to nail down a strict ABI, it would seem more > > > robust to have an explicit attribute to describe underlying PMU > > > properties like whether instances do represent identical "slices" or > > > not. The hex suffix thing is already proving how fragile names alone are > > > liable to be. > > > > Agreed. Does this mean we shouldn't land this? I worry that LKML is > > the home of bike shedding conversations and we're likely to bike shed > > trying to achieve 'perfect' while something 'good' would have value > > today. > > Ping. Thanks, applied to perf-tools-next, - Arnaldo ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH v2] perf Documentation: Describe the PMU naming convention 2024-12-20 19:42 ` Arnaldo Carvalho de Melo @ 2025-03-04 13:54 ` James Clark 0 siblings, 0 replies; 10+ messages in thread From: James Clark @ 2025-03-04 13:54 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, Ian Rogers, Robin.Murphy Cc: Robin Murphy, Liang, Kan, Randy Dunlap, Tuan Phan, Thomas Richter, Bhaskara Budiredla, Bharat Bhushan, Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark, Ravi Bangoria, linux-perf-users, linux-kernel, Will Deacon, Stephane Eranian On 20/12/2024 7:42 pm, Arnaldo Carvalho de Melo wrote: > On Fri, Dec 20, 2024 at 11:16:46AM -0800, Ian Rogers wrote: >> On Wed, Oct 23, 2024 at 9:21 AM Ian Rogers <irogers@google.com> wrote: >>> >>> On Wed, Oct 23, 2024 at 2:34 AM Robin Murphy <robin.murphy@arm.com> wrote: >>>> >>>> On 2024-10-23 5:06 am, Ian Rogers wrote: >>>>> On Thu, Jun 6, 2024 at 11:15 AM Liang, Kan <kan.liang@linux.intel.com> wrote: >>>>>> >>>>>> >>>>>> >>>>>> On 2024-06-06 12:49 a.m., Ian Rogers wrote: >>>>>>> It is an existing convention to use suffixes with PMU names. Try to >>>>>>> capture that convention so that future PMU devices may adhere to it. >>>>>>> >>>>>>> The name of the file and date within the file try to follow existing >>>>>>> conventions, particularly sysfs-bus-event_source-devices-events. >>>>>>> >>>>>>> Signed-off-by: Ian Rogers <irogers@google.com> >>>>>>> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> >>>>>>> --- >>>>>>> .../testing/sysfs-bus-event_source-devices | 24 +++++++++++++++++++ >>>>>>> 1 file changed, 24 insertions(+) >>>>>>> create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices >>>>>>> >>>>>> >>>>>> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> >>>>> >>>>> Thanks for all the reviews. Could we land this? >>>> >>>> Hmm, it's not always going to be strictly true as written though - we >>>> will also have cases where multiple PMU instances owned by the same >>>> driver don't all support the same events/filters/etc., and/or are >>>> entirely unrelated such that the same event encoding may mean completely >>>> different things. I've just landed a driver where not only are the >>>> instances going to be heterogeneous (since it's for arbitrary bits of >>>> interconnect), but for hierarchy reasons the most logical place to put >>>> the instance ID in the name wasn't even at the end :( >>> >>> Right, I was trying to capture what the tool is doing and trying to >>> encompass the problems hex suffix create. Another example of that >>> problem recently burning us is ARM's PMU naming of armv8_pmuv3_a53 >>> means the a53 looks like a hex suffix. When ARM release a model with a >>> 3 digit number will the naming break? Wrt filters, I wonder if there >>> should be testing, bugs, etc. The wildcard matching will likely do its >>> thing and I think the failures should be predictable and descriptive, >>> like an event used a format that a PMU doesn't support, but I'm not >>> sure if we should do improvements in `perf list` where we try to >>> deduplicate PMUs. Perhaps the deduplication should be smarter. >>> >>> >>>> FWIW I think if we want to nail down a strict ABI, it would seem more >>>> robust to have an explicit attribute to describe underlying PMU >>>> properties like whether instances do represent identical "slices" or >>>> not. The hex suffix thing is already proving how fragile names alone are >>>> liable to be. >>> >>> Agreed. Does this mean we shouldn't land this? I worry that LKML is >>> the home of bike shedding conversations and we're likely to bike shed >>> trying to achieve 'perfect' while something 'good' would have value >>> today. >> >> Ping. > > Thanks, applied to perf-tools-next, > > - Arnaldo > Just commenting to tie this into some related ideas that I put in the cover letter here: https://lore.kernel.org/linux-perf-users/20250304-james-perf-hybrid-list-v1-0-a363ffac283c@linaro.org/T/#m44b5da77819baa249d34bc5b2c7f10b65d3d7360 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-03-04 13:54 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-06-06 4:49 [RFC PATCH v2] perf Documentation: Describe the PMU naming convention Ian Rogers 2024-06-06 9:33 ` James Clark 2024-06-06 16:10 ` Leo Yan 2024-06-06 18:14 ` Liang, Kan 2024-10-23 4:06 ` Ian Rogers 2024-10-23 9:33 ` Robin Murphy 2024-10-23 16:21 ` Ian Rogers 2024-12-20 19:16 ` Ian Rogers 2024-12-20 19:42 ` Arnaldo Carvalho de Melo 2025-03-04 13:54 ` James Clark
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).