From: Keita Morisaki <keyz@google.com>
To: christian.loehle@arm.com
Cc: aarontian@google.com, daniel.lezcano@linaro.org, keyz@google.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, lpieralisi@kernel.org,
mathieu.desnoyers@efficios.com, mhiramat@kernel.org,
rafael@kernel.org, rostedt@goodmis.org, sudeep.holla@arm.com,
yimingtseng@google.com
Subject: Re: [PATCH v2] cpuidle: psci: Add trace for PSCI domain idle
Date: Tue, 28 Jan 2025 12:24:44 +0800 [thread overview]
Message-ID: <20250128042445.24920-1-keyz@google.com> (raw)
In-Reply-To: <31dd8c5d-0bc4-4d84-9ac9-7ca248e952cf@arm.com>
> > The trace event cpu_idle provides insufficient information for debugging
> > PSCI requests due to lacking access to determined PSCI domain idle
> > states. The cpu_idle usually only shows -1, 0, or 1 regardless how many
> > idle states the power domain has.
> >
> > Add new trace events namely psci_domain_idle_enter and
> > psci_domain_idle_exit to trace enter and exit events with a determined
> > idle state.
> >
> > These new trace events will help developers debug CPUidle issues on ARM
> > systems using PSCI by providing more detailed information about the
> > requested idle states.
> >
> > Signed-off-by: Keita Morisaki <keyz@google.com>
> > ---
> > v1->v2: Split the ftrace event into two (psci_domain_idle_(enter|exit))
> > and rephrase the commit message accordingly. Rebased onto the latest.
> Which makes it different to cpu_idle event FWIW.
Yes, psci_domain_idle_(enter|exit) are not meant to replace cpu_idle nor a
variant of it. It's new and different events that provide finer=grained info.
> > drivers/cpuidle/cpuidle-psci.c | 3 +++
> > include/trace/events/power.h | 37 ++++++++++++++++++++++++++++++++++
> > 2 files changed, 40 insertions(+)
> >
> > diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
> > index 2562dc001fc1..dd8d776d6e39 100644
> > --- a/drivers/cpuidle/cpuidle-psci.c
> > +++ b/drivers/cpuidle/cpuidle-psci.c
> > @@ -25,6 +25,7 @@
> > #include <linux/syscore_ops.h>
> >
> > #include <asm/cpuidle.h>
> > +#include <trace/events/power.h>
> >
> > #include "cpuidle-psci.h"
> > #include "dt_idle_states.h"
> > @@ -74,7 +75,9 @@ static __cpuidle int __psci_enter_domain_idle_state(struct cpuidle_device *dev,
> > if (!state)
> > state = states[idx];
> >
> > + trace_psci_domain_idle_enter(dev->cpu, state, s2idle);
> > ret = psci_cpu_suspend_enter(state) ? -1 : idx;
> > + trace_psci_domain_idle_exit(dev->cpu, state, s2idle);
> Not tracking ret seems odd, is that fine?
I think it's fine not to track ret here.
__psci_enter_domain_idle_state does not seems to care the return value of
psci_cpu_suspend_enter to me because it just proceeds with executing subsequent
functions regardless of ret, and returns ret to the higher function. If the
value should be traced, it should probably be done in a lower layer or a higher
layer.
Another small small reason I'm not interested in adding ret to the
trace_psci_domain_idle_exit's arguments is that
trace_psci_domain_idle_(enter|exit) currently share the same trace event
(i.e. same set of arguments) and it makes the trace events simple.
next prev parent reply other threads:[~2025-01-28 4:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 4:01 [PATCH] cpuidle: psci: Add trace for PSCI domain idle Keita Morisaki
2025-01-17 15:51 ` Steven Rostedt
2025-01-18 7:24 ` Keita Morisaki
2025-01-20 1:36 ` [PATCH v2] " Keita Morisaki
2025-01-24 20:28 ` Steven Rostedt
2025-01-25 1:27 ` Keita Morisaki
2025-01-25 1:31 ` [PATCH v3] " Keita Morisaki
2025-01-30 17:36 ` Kevin Hilman
2025-02-02 10:42 ` Keita Morisaki
2025-02-02 10:46 ` [PATCH v4] " Keita Morisaki
2025-02-03 5:32 ` Dhruva Gole
2025-01-27 12:16 ` [PATCH v2] " Christian Loehle
2025-01-28 4:24 ` Keita Morisaki [this message]
2025-01-28 11:06 ` Christian Loehle
2025-01-29 8:51 ` Keita Morisaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250128042445.24920-1-keyz@google.com \
--to=keyz@google.com \
--cc=aarontian@google.com \
--cc=christian.loehle@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sudeep.holla@arm.com \
--cc=yimingtseng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).