* [PATCH] trace doc: document the device_pm_callback events
@ 2024-09-22 13:26 Yo-Jung (Leo) Lin
2024-09-26 4:59 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Yo-Jung (Leo) Lin @ 2024-09-22 13:26 UTC (permalink / raw)
Cc: linux-kernel-mentees, ricardo, skhan, 0xff07, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Jonathan Corbet,
linux-kernel, linux-trace-kernel, linux-doc
Add documentation for the device_pm_callback_{start, end} events
under the "Subsystem Trace Points: power" section.
Signed-off-by: Yo-Jung (Leo) Lin <0xff07@gmail.com>
---
Documentation/trace/events-power.rst | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/Documentation/trace/events-power.rst b/Documentation/trace/events-power.rst
index f45bf11fa88d..7031954f7ed3 100644
--- a/Documentation/trace/events-power.rst
+++ b/Documentation/trace/events-power.rst
@@ -102,3 +102,30 @@ And, there are events used for CPU latency QoS add/update/remove request.
pm_qos_remove_request "value=%d"
The parameter is the value to be added/updated/removed.
+
+5. Device PM callback events
+============================
+The device PM callback events are placed right before and after an invocation of
+a device PM callback during a system-wide suspend/resume attempt.
+::
+
+ device_pm_callback_start "%s %s, parent: %s, %s[%s]"
+ device_pm_callback_end "%s %s, err=%d"
+
+The first two parameters in both events are the same. They are:
+
+ - The name of the driver.
+ - The device whose PM callbacks get called.
+
+For device_pm_callback_start, the rest of the parameters are:
+
+ - The parent device of the device (if any).
+ - Level in the power management hierarchy the callback belongs to (e.g. power
+ domain, type, class, bus, driver). Some stages (e.g. early, late, noirq)
+ will also be explicitly mentioned in this string.
+ - The ongoing PM event. You may find definitions of those events in the
+ PM_EVENT_* macros in include/linux/pm.h
+
+For device_pm_callback_end, the only remaining parameter is:
+
+ - The return value of the PM callback.
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] trace doc: document the device_pm_callback events
2024-09-22 13:26 [PATCH] trace doc: document the device_pm_callback events Yo-Jung (Leo) Lin
@ 2024-09-26 4:59 ` Steven Rostedt
2024-10-23 15:16 ` Yo-Jung Lin
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2024-09-26 4:59 UTC (permalink / raw)
To: Yo-Jung (Leo) Lin
Cc: linux-kernel-mentees, ricardo, skhan, Masami Hiramatsu,
Mathieu Desnoyers, Jonathan Corbet, linux-kernel,
linux-trace-kernel, linux-doc, Rafael J. Wysocki, linux-pm
This needs an ack from one of the power management maintainers.
-- Steve
On Sun, 22 Sep 2024 21:26:28 +0800
"Yo-Jung (Leo) Lin" <0xff07@gmail.com> wrote:
> Add documentation for the device_pm_callback_{start, end} events
> under the "Subsystem Trace Points: power" section.
>
> Signed-off-by: Yo-Jung (Leo) Lin <0xff07@gmail.com>
> ---
> Documentation/trace/events-power.rst | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/Documentation/trace/events-power.rst b/Documentation/trace/events-power.rst
> index f45bf11fa88d..7031954f7ed3 100644
> --- a/Documentation/trace/events-power.rst
> +++ b/Documentation/trace/events-power.rst
> @@ -102,3 +102,30 @@ And, there are events used for CPU latency QoS add/update/remove request.
> pm_qos_remove_request "value=%d"
>
> The parameter is the value to be added/updated/removed.
> +
> +5. Device PM callback events
> +============================
> +The device PM callback events are placed right before and after an invocation of
> +a device PM callback during a system-wide suspend/resume attempt.
> +::
> +
> + device_pm_callback_start "%s %s, parent: %s, %s[%s]"
> + device_pm_callback_end "%s %s, err=%d"
> +
> +The first two parameters in both events are the same. They are:
> +
> + - The name of the driver.
> + - The device whose PM callbacks get called.
> +
> +For device_pm_callback_start, the rest of the parameters are:
> +
> + - The parent device of the device (if any).
> + - Level in the power management hierarchy the callback belongs to (e.g. power
> + domain, type, class, bus, driver). Some stages (e.g. early, late, noirq)
> + will also be explicitly mentioned in this string.
> + - The ongoing PM event. You may find definitions of those events in the
> + PM_EVENT_* macros in include/linux/pm.h
> +
> +For device_pm_callback_end, the only remaining parameter is:
> +
> + - The return value of the PM callback.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] trace doc: document the device_pm_callback events
2024-09-26 4:59 ` Steven Rostedt
@ 2024-10-23 15:16 ` Yo-Jung Lin
0 siblings, 0 replies; 3+ messages in thread
From: Yo-Jung Lin @ 2024-10-23 15:16 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kernel-mentees, ricardo, skhan, Masami Hiramatsu,
Mathieu Desnoyers, Jonathan Corbet, linux-kernel,
linux-trace-kernel, linux-doc, Rafael J. Wysocki, linux-pm
Hi Rafael and the PM maintainers,
On Thu, Sep 26, 2024 at 12:59 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
>
> This needs an ack from one of the power management maintainers.
>
> -- Steve
>
>
> On Sun, 22 Sep 2024 21:26:28 +0800
> "Yo-Jung (Leo) Lin" <0xff07@gmail.com> wrote:
>
> > Add documentation for the device_pm_callback_{start, end} events
> > under the "Subsystem Trace Points: power" section.
> >
> > Signed-off-by: Yo-Jung (Leo) Lin <0xff07@gmail.com>
> > ---
> > Documentation/trace/events-power.rst | 27 +++++++++++++++++++++++++++
> > 1 file changed, 27 insertions(+)
> >
> > diff --git a/Documentation/trace/events-power.rst b/Documentation/trace/events-power.rst
> > index f45bf11fa88d..7031954f7ed3 100644
> > --- a/Documentation/trace/events-power.rst
> > +++ b/Documentation/trace/events-power.rst
> > @@ -102,3 +102,30 @@ And, there are events used for CPU latency QoS add/update/remove request.
> > pm_qos_remove_request "value=%d"
> >
> > The parameter is the value to be added/updated/removed.
> > +
> > +5. Device PM callback events
> > +============================
> > +The device PM callback events are placed right before and after an invocation of
> > +a device PM callback during a system-wide suspend/resume attempt.
> > +::
> > +
> > + device_pm_callback_start "%s %s, parent: %s, %s[%s]"
> > + device_pm_callback_end "%s %s, err=%d"
> > +
> > +The first two parameters in both events are the same. They are:
> > +
> > + - The name of the driver.
> > + - The device whose PM callbacks get called.
> > +
> > +For device_pm_callback_start, the rest of the parameters are:
> > +
> > + - The parent device of the device (if any).
> > + - Level in the power management hierarchy the callback belongs to (e.g. power
> > + domain, type, class, bus, driver). Some stages (e.g. early, late, noirq)
> > + will also be explicitly mentioned in this string.
> > + - The ongoing PM event. You may find definitions of those events in the
> > + PM_EVENT_* macros in include/linux/pm.h
> > +
> > +For device_pm_callback_end, the only remaining parameter is:
> > +
> > + - The return value of the PM callback.
>
I think it'll be helpful to have your feedback on this documentation
proposal. Would you kindly help take a look? I believe that any
feedback would be really helpful. Thank you!
Best,
Leo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-23 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22 13:26 [PATCH] trace doc: document the device_pm_callback events Yo-Jung (Leo) Lin
2024-09-26 4:59 ` Steven Rostedt
2024-10-23 15:16 ` Yo-Jung Lin
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).