From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Juri Lelli <juri.lelli@redhat.com>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Amit Daniel Kachhap <amit.kachhap@gmail.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Thara Gopinath <thara.gopinath@linaro.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
LAK <linux-arm-kernel@lists.infradead.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Valentin Schneider <valentin.schneider@arm.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>
Subject: Re: [PATCH 1/3] thermal/cpu-cooling, sched/core: Cleanup thermal pressure definition
Date: Sat, 20 Jun 2020 18:49:12 +0100 [thread overview]
Message-ID: <20200620174912.GA18358@arm.com> (raw)
In-Reply-To: <CAKfTPtCyi9acak95_2_2uL3Cf0OMAbZhDav2LbPY+ULPrD7z4w@mail.gmail.com>
Hi Vincent,
On Thursday 18 Jun 2020 at 17:03:24 (+0200), Vincent Guittot wrote:
> On Sun, 14 Jun 2020 at 03:10, Valentin Schneider
> <valentin.schneider@arm.com> wrote:
[..]
> > diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
> > index e297e135c031..a1efd379b683 100644
> > --- a/drivers/thermal/cpufreq_cooling.c
> > +++ b/drivers/thermal/cpufreq_cooling.c
> > @@ -417,6 +417,11 @@ static int cpufreq_get_cur_state(struct thermal_cooling_device *cdev,
> > return 0;
> > }
> >
> > +__weak void
> > +arch_set_thermal_pressure(const struct cpumask *cpus, unsigned long th_pressure)
> > +{
> > +}
>
> Having this weak function declared in cpufreq_cooling is weird. This
> means that we will have to do so for each one that wants to use it.
>
> Can't you declare an empty function in a common header file ?
Do we expect anyone other than cpufreq_cooling to call
arch_set_thermal_pressure()?
I'm not against any of the options, either having it here as a week
default definition (same as done for arch_set_freq_scale() in cpufreq.c)
or in a common header (as done for arch_scale_freq_capacity() in sched.h).
But for me, Valentin's implementation seems more natural as setters are
usually only called from within the framework that does the control
(throttling for thermal or frequency setting for cpufreq) and we
probably want to think twice if we want to call them from other places.
Thanks,
Ionela.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-06-20 17:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 1:07 [PATCH 0/3] sched, arch_topology: Thermal pressure configuration cleanup Valentin Schneider
2020-06-14 1:07 ` [PATCH 1/3] thermal/cpu-cooling, sched/core: Cleanup thermal pressure definition Valentin Schneider
2020-06-14 7:39 ` kernel test robot
2020-06-14 21:04 ` Valentin Schneider
2020-06-14 8:57 ` kernel test robot
2020-06-14 9:10 ` kernel test robot
2020-06-18 15:03 ` Vincent Guittot
2020-06-20 17:49 ` Ionela Voinescu [this message]
[not found] ` <jhjmu4xcqyk.mognet@arm.com>
[not found] ` <CAKfTPtDG26Y9s4c+MbdmbxJaiCv6s6WTqmzztcoFsm2SnRL=vQ@mail.gmail.com>
2020-07-05 14:19 ` Valentin Schneider
2020-07-06 12:53 ` Vincent Guittot
2020-06-14 1:07 ` [PATCH 2/3] sched: Cleanup SCHED_THERMAL_PRESSURE setup Valentin Schneider
2020-06-14 1:07 ` [PATCH 3/3] arm, arm64: Select CONFIG_SCHED_THERMAL_PRESSURE Valentin Schneider
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=20200620174912.GA18358@arm.com \
--to=ionela.voinescu@arm.com \
--cc=amit.kachhap@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sudeep.holla@arm.com \
--cc=thara.gopinath@linaro.org \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@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).