From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Mario Limonciello" <superm1@kernel.org>,
"Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Luke D . Jones" <luke@ljones.dev>
Cc: "platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"Derek J . Clark" <derekjohn.clark@gmail.com>,
"Antheas Kapenekakis" <lkml@antheas.dev>,
me@kylegospodneti.ch, "Denis Benato" <benato.denis96@gmail.com>,
"Limonciello, Mario" <mario.limonciello@amd.com>
Subject: Re: [RFC 0/2] "custom" ACPI platform profile support
Date: Thu, 26 Sep 2024 15:19:32 -0400 [thread overview]
Message-ID: <5dcc2f87-e8c0-4f33-9b75-054eb0acb81a@app.fastmail.com> (raw)
In-Reply-To: <7bfba4ef-0f42-4482-874f-77a4434eb338@kernel.org>
On Thu, Sep 26, 2024, at 2:14 PM, Mario Limonciello wrote:
> On 9/26/2024 08:58, Mark Pearson wrote:
>> Thanks Mario,
>>
>> On Wed, Sep 25, 2024, at 10:59 PM, Mario Limonciello wrote:
>>> From: Mario Limonciello <mario.limonciello@amd.com>
>>>
>>> There are two major ways to tune platform performance in Linux:
>>> * ACPI platform profile
>>> * Manually tuning APU performance
>>>
>>> Changing the ACPI platform profile is a "one stop shop" to change
>>> performance limits and fan curves all at the same time.
>>>
>>> On AMD systems the manual tuning methods typically involve changing
>>> values of settings such as fPPT, sPPT or SPL.
>>>
>>> The problem with changing these settings manually is that the definition
>>> of the ACPI platform profile if supported by the hardware is no longer
>>> accurate. At best this can cause misrepresenting the state of the
>>> platform to userspace and at worst can cause the state machine into an
>>> invalid state.
>>>
>>> The existence and continued development of projects such as ryzenadj which
>>> manipulate debugging interfaces show there is a demand for manually tuning
>>> performance.
>>>
>>> Furthermore some systems (such as ASUS and Lenovo handhelds) offer an
>>> ACPI-WMI interface for changing these settings. If using anything outside
>>> that WMI interface the state will be wrong. If using that WMI interface
>>> the platform profile will be wrong.
>>>
>>> This series introduces a "custom" ACPI platform profile and adds support
>>> for the AMD PMF driver to use it when a user has enabled manual
>>> adjustments.
>>>
>>> If agreeable a similar change should be made to asus-armoury and any other
>>> drivers that export the ability to change these settings but also a
>>> platform profile.
>>>
>>
>> As someone who supports customers on Lenovo devices and hits the occasional situation where a user has made strange tweaks to different power related settings, and then complains about power or thermal issues - I love the idea that it can be made clear the system has been 'adjusted' in a non standard way. I can also see why users would want interfaces to do those changes.
>
> JFYI we're going to do something really similar in amdgpu when people
> have enabled overclocking. That's part of the inspiration for this RFC.
>
> https://lore.kernel.org/amd-gfx/CADnq5_M+vxGV6y8oEQHC+-CcqV-vW9ND4SsRHqHKbwR_b0iJ9g@mail.gmail.com/T/#m1d69399c3e799ea1ef2014a27fd6e555f9e70ba0
>
Nice :)
>>
>> Some suggestions:
>>
>> I'm wondering if we can make it so a driver can register only a 'custom' profile as an extra profile handler?
>>
>> The thinking here is the custom setting in this series is implemented for the amd sps driver, and therefore on a regular Lenovo laptop wouldn't be used, as the thinkpad_acpi driver will grab the profile slot, Users on Lenovo systems aren't going to be able to get at these extra tweaks (unless they unload thinkpad_acpi, which has other side effects).
>
> Well the RFC was just to show it for the AMD PMF driver, but I think
> that thinkpad_acpi, asus_armoury etc could all potentially implement the
> 'custom' bit too if they offer an ACPI-WMI interface to similar settings.
>
>>
>> If the sps driver can offer a custom mode, separately from thinkpad_acpi, then users can tweak settings to their hearts content but get back to regular mode when done.
>>
>> I also think there needs to be a way that when you switch from custom back to a 'regular' profile that it would do a clean up of anything tweaked. e.g. when switching away from custom the ppd driver should call a 'custom mode cleanup' function, so things can be undone and returned to how they were when it was started.
>>
>> Mark
>
> I guess what you're proposing is that multiple drivers register as
> profile handlers and they might not all export the same features.
>
> If we did something like this we could instead have the core call
> callbacks for all platform profile handlers. We could also drop a pile
> of quirks from amd-pmf where there are some ASUS systems that advertise
> SPS in in the PMF framework and also asus-wmi provides it.
>
> If I'm following you right, I generally like this idea.
Yep - that was the idea.
This feels like a step towards giving more control to power users - whilst keeping the basic simple for regular folk.
I can imagine utilities that would use this to enable specific configurations, via the custom profile mode, for many different scenario's; whilst still allowing a user to get back to the tested and vendor approved setting if things go badly.
Mark
next prev parent reply other threads:[~2024-09-26 19:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 2:59 Mario Limonciello
2024-09-26 2:59 ` [RFC 1/2] ACPI: Add support for a 'custom' profile Mario Limonciello
2024-09-26 2:59 ` [RFC 2/2] platform/x86/amd: pmf: Add manual control support Mario Limonciello
2024-09-26 8:52 ` Antheas Kapenekakis
2024-09-26 18:53 ` Mario Limonciello
2024-09-27 4:01 ` Derek John Clark
2024-09-26 10:25 ` Shyam Sundar S K
2024-09-26 11:00 ` Antheas Kapenekakis
2024-09-26 18:09 ` Mario Limonciello
2024-09-27 8:44 ` Antheas Kapenekakis
2024-12-19 13:12 ` Antheas Kapenekakis
2024-12-19 14:49 ` Mario Limonciello
2024-12-19 15:24 ` Antheas Kapenekakis
2024-12-19 16:13 ` Mario Limonciello
2024-12-19 21:10 ` Antheas Kapenekakis
2024-12-19 21:21 ` Mario Limonciello
2024-12-19 21:27 ` Antheas Kapenekakis
2024-12-19 21:35 ` Mario Limonciello
2024-09-26 8:40 ` [RFC 0/2] "custom" ACPI platform profile support Antheas Kapenekakis
2024-09-26 9:00 ` Antheas Kapenekakis
2024-09-26 13:58 ` Mark Pearson
2024-09-26 18:14 ` Mario Limonciello
2024-09-26 19:19 ` Mark Pearson [this message]
2024-09-26 19:41 ` Antheas Kapenekakis
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=5dcc2f87-e8c0-4f33-9b75-054eb0acb81a@app.fastmail.com \
--to=mpearson-lenovo@squebb.ca \
--cc=Shyam-sundar.S-k@amd.com \
--cc=benato.denis96@gmail.com \
--cc=derekjohn.clark@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@antheas.dev \
--cc=luke@ljones.dev \
--cc=mario.limonciello@amd.com \
--cc=me@kylegospodneti.ch \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=superm1@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
all inboxes | Powered by JetHome®