From: Viresh Kumar <viresh.kumar@linaro.org>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
cristian.marussi@arm.com, sudeep.holla@arm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] cpufreq: stats: Defer stats update to cpufreq_stats_record_transition()
Date: Wed, 16 Sep 2020 11:26:41 +0530 [thread overview]
Message-ID: <20200916055641.g654zoukjeqpjmwz@vireshk-i7> (raw)
In-Reply-To: <bd6e6d93-7491-0971-3bed-27d1885c38cd@arm.com>
On 15-09-20, 11:04, Lukasz Luba wrote:
> Hi Viresh,
>
> On 9/2/20 8:24 AM, Viresh Kumar wrote:
> > In order to prepare for lock-less stats update, add support to defer any
> > updates to it until cpufreq_stats_record_transition() is called.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> > drivers/cpufreq/cpufreq_stats.c | 75 ++++++++++++++++++++++++---------
> > 1 file changed, 56 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> > index 94d959a8e954..fdf9e8556a49 100644
> > --- a/drivers/cpufreq/cpufreq_stats.c
> > +++ b/drivers/cpufreq/cpufreq_stats.c
> > @@ -22,17 +22,22 @@ struct cpufreq_stats {
>
> Would it be possible to move this structure in the
> linux/cpufreq.h header? Any subsystem could have access to it,
> like to the cpuidle stats.
Hmm, I am not sure why we should be doing it. In case of cpuidle many
parts of the kernel are playing with cpuidle code, like drivers/idle/,
drivers/cpuidle, etc.
Something should land in include/ only if you want others to use it,
but in case of cpufreq no one should be using cpufreq stats.
So unless you have a real case where that might be beneficial, I am
going to keep it as is.
> Apart from that (and the comment regarding the 'atomic_t' field)
> I don't see any issues.
Thanks.
--
viresh
next prev parent reply other threads:[~2020-09-16 5:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 7:24 [PATCH 0/4] cpufreq: Record stats with fast-switching Viresh Kumar
2020-09-02 7:24 ` [PATCH 1/4] cpufreq: stats: Defer stats update to cpufreq_stats_record_transition() Viresh Kumar
2020-09-11 10:11 ` peterz
2020-09-11 11:35 ` Viresh Kumar
2020-09-11 12:16 ` Rafael J. Wysocki
2020-09-15 10:04 ` Lukasz Luba
2020-09-16 5:56 ` Viresh Kumar [this message]
2020-09-02 7:24 ` [PATCH 2/4] cpufreq: stats: Remove locking Viresh Kumar
2020-09-02 7:24 ` [PATCH 3/4] cpufreq: stats: Enable stats for fast-switch as well Viresh Kumar
2020-09-02 7:24 ` [PATCH 4/4] cpufreq: Move traces and update to policy->cur to cpufreq core Viresh Kumar
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=20200916055641.g654zoukjeqpjmwz@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=cristian.marussi@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rjw@rjwysocki.net \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
/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).