Re: [PATCH v3 0/4] Add support for a DRM tool like PMU

2025-04-30 Thread Ian Rogers
On Thu, Apr 3, 2025 at 1:24 PM Ian Rogers wrote: > > DRM clients expose information through usage stats as documented in > Documentation/gpu/drm-usage-stats.rst (available online at > https://docs.kernel.org/gpu/drm-usage-stats.html). Add a tool like > PMU, similar to the hwmon PM

[PATCH v2 1/4] perf parse-events: Avoid scanning PMUs that can't contain events

2025-04-05 Thread Ian Rogers
Add perf_pmus__scan_for_event that only reads sysfs for pmus that could contain a given event. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/pmus.c | 35 ++ tools/perf/util/pmus.h | 1 + 3 files changed

[PATCH v3 0/4] Add support for a DRM tool like PMU

2025-04-05 Thread Ian Rogers
(exit 2) doesn't trigger the trap cleanup. v2: Add support to only scan hwmon and drm PMUs if the event or PMU wildcard can match. Add a test as requested by Namhyung. Add file comments. v1: https://lore.kernel.org/lkml/20250211071727.364389-1-irog...@google.com/ Ian Rogers (4): perf

[PATCH v3 3/4] perf drm_pmu: Add a tool like PMU to expose DRM information

2025-04-05 Thread Ian Rogers
ot;perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs") and later so that only if full wild carding is being done, the PMU starts with "drm_" or the event starts with "drm-" will /proc be scanned. That is there should be little to no cost in this PMU unless DRM events are

[PATCH v3 4/4] perf tests: Add a DRM PMU test

2025-04-03 Thread Ian Rogers
The test opens any DRM devices so that the shell has fdinfo files containing the DRM data. The test then uses perf stat to make sure the events can be read. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/drm_pmu.sh | 78 +++ 1 file changed, 78 insertions

[PATCH v3 2/4] perf parse-events: Avoid scanning PMUs that can't match a wildcard

2025-04-03 Thread Ian Rogers
can't be a hwmon PMU wildcard, reading hwmon PMUs is avoided. On my laptop this reduces 'perf stat -e inst_retired.any true' from performing 253 openat system calls down to 234. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 2

[PATCH v3 1/4] perf parse-events: Avoid scanning PMUs that can't contain events

2025-04-03 Thread Ian Rogers
Add perf_pmus__scan_for_event that only reads sysfs for pmus that could contain a given event. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/pmus.c | 35 ++ tools/perf/util/pmus.h | 1 + 3 files changed

[PATCH v2 3/4] perf drm_pmu: Add a tool like PMU to expose DRM information

2025-03-25 Thread Ian Rogers
ot;perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs") and later so that only if full wild carding is being done, the PMU starts with "drm_" or the event starts with "drm-" will /proc be scanned. That is there should be little to no cost in this PMU unless DRM events are

[PATCH v2 4/4] perf tests: Add a DRM PMU test

2025-03-25 Thread Ian Rogers
The test opens any DRM devices so that the shell has fdinfo files containing the DRM data. The test then uses perf stat to make sure the events can be read. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/drm_pmu.sh | 77 +++ 1 file changed, 77 insertions

[PATCH v2 0/4] Add support for a DRM tool like PMU

2025-03-25 Thread Ian Rogers
PMUs if the event or PMU wildcard can match. Add a test as requested by Namhyung. Add file comments. v1: https://lore.kernel.org/lkml/20250211071727.364389-1-irog...@google.com/ Ian Rogers (4): perf parse-events: Avoid scanning PMUs that can't contain events perf parse-events: Avoid sca

[PATCH v2 2/4] perf parse-events: Avoid scanning PMUs that can't match a wildcard

2025-03-25 Thread Ian Rogers
can't be a hwmon PMU wildcard, reading hwmon PMUs is avoided. On my laptop this reduces 'perf stat -e inst_retired.any true' from performing 253 openat system calls down to 234. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 2

[PATCH v1] perf drm_pmu: Add a tool like PMU to expose DRM information

2025-02-10 Thread Ian Rogers
ot;perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs") so that only if full wild carding is being done, that the drm PMUs will be read. Signed-off-by: Ian Rogers --- tools/perf/util/Build | 1 + tools/perf/util/drm_pmu.c | 688 ++ tools/perf/util/

[PATCH v5 2/4] proc_pid_fdinfo.5: Make pid clearer in the name and 1st paragraph

2024-12-05 Thread Ian Rogers
Previously the pid was highlighted through being a tagged paragraph but not mentioned in the description. Add italics to the path emphasizing pid and then change the first sentence to include pid in the definition. Suggested-by: G. Branden Robinson --- v5. Switch .IR pid to .I pid --- man/man5/p

[PATCH v5 3/4] proc_pid_fdinfo.5: Add subsection headers for different fd types

2024-12-05 Thread Ian Rogers
Make the sections about eventfd, epoll, signalfd, inotify, fanotify, timerfd better separated with a clearer subsection header. --- man/man5/proc_pid_fdinfo.5 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index 2797ae216..c4914f1f

[PATCH v5 1/4] proc_pid_fdinfo.5: Reduce indent for most of the page

2024-12-05 Thread Ian Rogers
When /proc/pid/fdinfo was part of proc.5 man page the indentation made sense. As a standalone man page the indentation doesn't need to be so far over to the right. Remove the initial tagged pragraph, move the "since Linux 2.6.22" to a new history subsection. Suggested-by: G. Branden Robinson ---

[PATCH v5 4/4] proc_pid_fdinfo.5: Add DRM subsection

2024-12-05 Thread Ian Rogers
Add description of DRM fdinfo information based on the Linux kernel's `Documentation/gpu/drm-usage-stats.rst`: https://docs.kernel.org/gpu/drm-usage-stats.html --- v5. Update style a suggested-by G. Branden Robinson --- man/man5/proc_pid_fdinfo.5 | 107 + 1

Re: [PATCH v3 2/4] proc_pid_fdinfo.5: Make pid clearer in the name and 1st paragraph

2024-12-05 Thread Ian Rogers
On Sat, Nov 2, 2024 at 3:17 AM G. Branden Robinson wrote: > > Hi Ian, > > At 2024-11-01T12:11:54-0700, Ian Rogers wrote: > > diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 > > index 87e6dbe56..935b54b4c 100644 > > --- a/man/man5/proc_p

[PATCH v4 1/4] proc_pid_fdinfo.5: Reduce indent for most of the page

2024-11-01 Thread Ian Rogers
randen Robinson Signed-off-by: Ian Rogers --- v4. Move since to history from Alejandro Colomar's review comment. --- man/man5/proc_pid_fdinfo.5 | 51 +++--- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/ma

[PATCH v4 2/4] proc_pid_fdinfo.5: Make pid clearer in the name and 1st paragraph

2024-11-01 Thread Ian Rogers
Previously the pid was highlighted through being a tagged paragraph but not mentioned in the description. Add italics to the path emphasizing pid and then change the first sentence to include pid in the definition. Suggested-by: G. Branden Robinson Signed-off-by: Ian Rogers --- man/man5

[PATCH v4 4/4] proc_pid_fdinfo.5: Add DRM subsection

2024-11-01 Thread Ian Rogers
Add description of DRM fdinfo information based on the Linux kernel's `Documentation/gpu/drm-usage-stats.rst`: https://docs.kernel.org/gpu/drm-usage-stats.html Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 94 ++ 1 file changed, 94 inser

[PATCH v4 3/4] proc_pid_fdinfo.5: Add subsection headers for different fd types

2024-11-01 Thread Ian Rogers
Make the sections about eventfd, epoll, signalfd, inotify, fanotify, timerfd better separated with a clearer subsection header. Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5

[PATCH v3 1/4] proc_pid_fdinfo.5: Reduce indent for most of the page

2024-11-01 Thread Ian Rogers
When /proc/pid/fdinfo was part of proc.5 man page the indentation made sense. As a standalone man page the indentation doesn't need to be so far over to the right. Remove the initial tagged pragraph. Suggested-by: G. Branden Robinson Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdi

[PATCH v3 3/4] proc_pid_fdinfo.5: Add subsection headers for different fd types

2024-11-01 Thread Ian Rogers
Make the sections about eventfd, epoll, signalfd, inotify, fanotify, timerfd better separated with a clearer subsection header. Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5

[PATCH v3 4/4] proc_pid_fdinfo.5: Add DRM subsection

2024-11-01 Thread Ian Rogers
Add description of DRM fdinfo information based on the Linux kernel's `Documentation/gpu/drm-usage-stats.rst`: https://docs.kernel.org/gpu/drm-usage-stats.html Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 94 ++ 1 file changed, 94 inser

[PATCH v3 2/4] proc_pid_fdinfo.5: Make pid clearer in the name and 1st paragraph

2024-11-01 Thread Ian Rogers
Previously the pid was highlighted through being a tagged paragraph but not mentioned in the description. Add italics to the path emphasizing pid and then change the first sentence to include pid in the definition. Suggested-by: G. Branden Robinson Signed-off-by: Ian Rogers --- man/man5

Re: [PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page

2024-11-01 Thread Ian Rogers
On Fri, Nov 1, 2024 at 6:24 AM Alejandro Colomar wrote: > > On Tue, Oct 15, 2024 at 02:17:17PM -0700, Ian Rogers wrote: > > When /proc/pid/fdinfo was part of proc.5 man page the indentation made > > sense. As a standalone man page the indentation doesn't need to be so &g

[PATCH v2 2/3] proc_pid_fdinfo.5: Add subsection headers for different fd types

2024-10-15 Thread Ian Rogers
Make the sections about eventfd, epoll, signalfd, inotify, fanotify, timerfd better separated with a clearer subsection header. Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5

[PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page

2024-10-15 Thread Ian Rogers
igned-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 66 ++ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index 1e23bbe02..8678caf4a 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man

[PATCH v2 3/3] proc_pid_fdinfo.5: Add DRM subsection

2024-10-15 Thread Ian Rogers
Add description of DRM fdinfo information based on the Linux kernel's `Documentation/gpu/drm-usage-stats.rst`: https://docs.kernel.org/gpu/drm-usage-stats.html Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 94 ++ 1 file changed, 94 inser

Re: [PATCH v1 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page

2024-10-15 Thread Ian Rogers
On Tue, Oct 15, 2024 at 1:32 PM G. Branden Robinson wrote: > > At 2024-10-15T11:38:22-0700, Ian Rogers wrote: > > When /proc/pid/fdinfo was part of proc.5 man page the indentation made > > sense. As a standalone man page the indentation doesn't need to be so &g

[PATCH v1 3/3] proc_pid_fdinfo.5: Add DRM subsection

2024-10-15 Thread Ian Rogers
Add description of DRM fdinfo information based on the Linux kernel's `Documentation/gpu/drm-usage-stats.rst`: https://docs.kernel.org/gpu/drm-usage-stats.html Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 94 ++ 1 file changed, 94 inser

[PATCH v1 2/3] proc_pid_fdinfo.5: Add subsection headers for different fd types

2024-10-15 Thread Ian Rogers
Make the sections about eventfd, epoll, signalfd, inotify, fanotify, timerfd better separated with a clearer subsection header. Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5

[PATCH v1 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page

2024-10-15 Thread Ian Rogers
When /proc/pid/fdinfo was part of proc.5 man page the indentation made sense. As a standalone man page the indentation doesn't need to be so far over to the right. Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 50 +++--- 1 file changed, 25 inser

Re: [PATCH v1] drm: Fix separator for drm-pdev

2024-10-15 Thread Ian Rogers
On Tue, Oct 15, 2024 at 11:27 AM Ian Rogers wrote: > > The PCI slot address for drm-pdev should be a colon not a period. On a > i915 GPU I see: > ``` > drm-pdev: :00:02.0 > ``` > > Signed-off-by: Ian Rogers Possibly: Fixes: 055634e4b62f ("drm/i915: Expose

[PATCH v1] drm: Fix separator for drm-pdev

2024-10-15 Thread Ian Rogers
The PCI slot address for drm-pdev should be a colon not a period. On a i915 GPU I see: ``` drm-pdev: :00:02.0 ``` Signed-off-by: Ian Rogers --- Documentation/gpu/drm-usage-stats.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/gpu/drm-usage

Re: [PATCH 1/7] perf/core: Add pmu get/put

2024-07-23 Thread Ian Rogers
On Mon, Jul 22, 2024 at 2:07 PM Lucas De Marchi wrote: > > If a pmu is unregistered while there's an active event, perf will still > access the pmu via event->pmu, even after the event is destroyed. This > makes it difficult for drivers like i915 that take a reference on the > device when the even