From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Lukasz Luba <lukasz.luba@arm.com>,
Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-pm@vger.kernel.org, x86@kernel.org,
linux-doc@vger.kernel.org, Len Brown <len.brown@intel.com>,
Aubrey Li <aubrey.li@linux.intel.com>,
Amit Kucheria <amitk@kernel.org>, Andi Kleen <ak@linux.intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
"Ravi V. Shankar" <ravi.v.shankar@intel.com>,
Ricardo Neri <ricardo.neri@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/7] thermal: netlink: Add a new event to notify CPU capabilities change
Date: Tue, 09 Nov 2021 05:23:31 -0800 [thread overview]
Message-ID: <e244e3aa9fc323973d7da8d3ebc3e1fad1fdb731.camel@linux.intel.com> (raw)
In-Reply-To: <2160a0b8-59ec-03a1-1fd5-a3f98085be07@arm.com>
Hi Lukasz,
On Tue, 2021-11-09 at 12:39 +0000, Lukasz Luba wrote:
> Hi Ricardo,
>
>
> On 11/6/21 1:33 AM, Ricardo Neri wrote:
> > From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> >
> > Add a new netlink event to notify change in CPU capabilities in
> > terms of
> > performance and efficiency.
>
> Is this going to be handled by some 'generic' tools? If yes, maybe
> the values for 'performance' might be aligned with capacity
> [0,1024] ? Or are they completely not related so the mapping is
> simply impossible?
>
That would have been very useful.
The problem is that we may not know the maximum performance as system
may be booting with few CPUs (using maxcpus kernel command line) and
then user hot adding them. So we may need to rescale when we get a new
maximum performance CPU and send to user space.
We can't just use max from HFI table at in instance as it is not
necessary that HFI table contains data for all CPUs.
If HFI max performance value of 255 is a scaled value to max
performance CPU value in the system, then this conversion would have
been easy. But that is not.
> >
> > Firmware may change CPU capabilities as a result of thermal events
> > in the
> > system or to account for changes in the TDP (thermal design power)
> > level.
> >
> > This notification type will allow user space to avoid running
> > workloads
> > on certain CPUs or proactively adjust power limits to avoid future
> > events.
> >
> > Cc: Andi Kleen <ak@linux.intel.com>
> > Cc: Aubrey Li <aubrey.li@linux.intel.com>
> > Cc: Tim Chen <tim.c.chen@linux.intel.com>
> > Cc: "Ravi V. Shankar" <ravi.v.shankar@intel.com>
> > Reviewed-by: Len Brown <len.brown@intel.com>
> > Signed-off-by: Srinivas Pandruvada <
> > srinivas.pandruvada@linux.intel.com>
> > ---
> > drivers/thermal/thermal_netlink.c | 52
> > +++++++++++++++++++++++++++++++
> > drivers/thermal/thermal_netlink.h | 13 ++++++++
> > include/uapi/linux/thermal.h | 6 +++-
> > 3 files changed, 70 insertions(+), 1 deletion(-)
>
> [snip]
>
> >
> > +struct cpu_capability {
> > + int cpu;
> > + int perf;
> > + int eff;
Good idea.
Thanks,
Srinivas
>
> Why not use the full names, instead of thse shortcuts? We use full
> naming e.g. in cpufreq framework such as 'frequency' not 'freq'.
> The 'eff' is really not meaningful ('perf' a bit less but it has
> to meanings in kernel).
>
> Regards,
> Lukasz
next prev parent reply other threads:[~2021-11-09 13:23 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-06 1:33 [PATCH 0/7] Thermal: Introduce the Hardware Feedback Interface for thermal and performance management Ricardo Neri
2021-11-06 1:33 ` [PATCH 1/7] x86/Documentation: Describe the Intel Hardware Feedback Interface Ricardo Neri
2021-11-30 9:24 ` Daniel Lezcano
2021-11-30 10:20 ` Srinivas Pandruvada
2021-11-06 1:33 ` [PATCH 2/7] x86: Add definitions for " Ricardo Neri
2021-11-06 10:30 ` Borislav Petkov
2021-11-06 22:01 ` Ricardo Neri
2021-11-06 1:33 ` [PATCH 3/7] thermal: intel: hfi: Minimally initialize the " Ricardo Neri
2021-11-08 8:47 ` Peter Zijlstra
2021-11-09 2:28 ` Ricardo Neri
2021-11-24 14:09 ` Rafael J. Wysocki
2021-11-30 3:20 ` Ricardo Neri
2021-11-30 3:55 ` Srinivas Pandruvada
2021-11-30 13:45 ` Ricardo Neri
2021-11-06 1:33 ` [PATCH 4/7] thermal: intel: hfi: Handle CPU hotplug events Ricardo Neri
2021-11-24 14:48 ` Rafael J. Wysocki
2021-11-30 13:21 ` Ricardo Neri
2021-11-30 13:32 ` Rafael J. Wysocki
2021-12-02 23:43 ` Ricardo Neri
2021-11-06 1:33 ` [PATCH 5/7] thermal: intel: hfi: Enable notification interrupt Ricardo Neri
2021-11-08 9:01 ` Peter Zijlstra
2021-11-09 15:00 ` Ricardo Neri
2021-11-08 9:07 ` Peter Zijlstra
2021-11-09 2:26 ` Ricardo Neri
2021-11-09 8:48 ` Peter Zijlstra
2021-11-09 12:54 ` Srinivas Pandruvada
2021-11-06 1:33 ` [PATCH 6/7] thermal: netlink: Add a new event to notify CPU capabilities change Ricardo Neri
2021-11-09 12:39 ` Lukasz Luba
2021-11-09 13:23 ` Srinivas Pandruvada [this message]
2021-11-09 13:53 ` Lukasz Luba
2021-11-09 14:15 ` Srinivas Pandruvada
2021-11-09 17:51 ` Lukasz Luba
2021-11-09 21:25 ` Srinivas Pandruvada
2021-11-30 9:29 ` Daniel Lezcano
2021-12-09 16:03 ` Ricardo Neri
2021-12-09 16:57 ` Daniel Lezcano
2021-12-09 17:39 ` Srinivas Pandruvada
2021-11-06 1:33 ` [PATCH 7/7] thermal: intel: hfi: Notify user space for HFI events Ricardo Neri
2021-11-24 15:18 ` Rafael J. Wysocki
2021-11-26 6:23 ` Srinivas Pandruvada
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=e244e3aa9fc323973d7da8d3ebc3e1fad1fdb731.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=ak@linux.intel.com \
--cc=amitk@kernel.org \
--cc=aubrey.li@linux.intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=len.brown@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=ravi.v.shankar@intel.com \
--cc=ricardo.neri-calderon@linux.intel.com \
--cc=ricardo.neri@intel.com \
--cc=tim.c.chen@linux.intel.com \
--cc=x86@kernel.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