Re: [External] Re: RFC: offering a standardized (/sys/class) userspace API for selecting system/laptop performance-profiles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, sorry for response delay I'm very busy at work this period

A common interface is surely the best solution, especially because it allows 
to standardize the user-space tools and maybe to integrate its with desktop, 
like Bastien is doing with gnome-power-profiles-daemon or like the similar tool
plasma-pstate.

I think we should keep separate performance and thermal profiles thus leaving 
the possibility of setting a thermal profile independently of the performance
profile and vice versa.

Hp implements up to 4 thermal profiles (apparently the same ones that implement
dell), my patch implements the first 3 profiles which are the ones supported by
my hardware.

1. HP Recommended -> fan stay off and start at low~medium speed when necessary
2. Performance    -> fan stay off and start at medium~hight speed when 
necessary
3. Cool           -> fan stay off and start at medium~hight speed when 
necessary
4. Quiet          -> fan should stay off and start at very low speed if 
necessary

for each profile the firmware set also a OEM variable to select DPTF profile
with the adeguate power limit.

combining these profiles with the performance profiles it is possible to obtain
the desired performance according to the needs of the moment

e.g.

For gaming purpose when the CPU and GPU share the thermal budget, in this case 
the best solution is to set thermal profile to performance to maximize the heat 
dissipation and the p-state profile to powersave, in this way during loadings 
the cpu gain a performance boost that allow to reduce loading time, instead, 
during gameplay the cpu performance will be limited in favor of the GPU 
allowing the maximum framerate to be reached.
(feral had to handle it for its gamemode tool: 
https://github.com/FeralInteractive/gamemode/pull/179)

Another opposed particular case could be thermal profile set to quiet and
p-state set to performance, usefull for example to maximizze cpu performance 
in silent ambient room like a library, obviously for CPU-only intesive tasks 
the best solution is to set either thermal and performance profile to 
performance.

Basically there are infinite combinations that can be made to obtain the best 
configuration for each situation, to allow this a common interface should offer
a possibility to:

- Define the list of thermal profiles separately from the performance ones
- Eventually define a list of on/off attributes (useful for lenovo lap_mode?)
- Provide a description of them
- Switching between thermal profiles regardless of the performance profile

A possible solution could be a "slider like" interface for performance level
and a list of thermal profile.

On Thu, 2020-09-17 at 13:22 +0200, Hans de Goede wrote:
> Elia, Mark, I assume that both of you want to get your patches for this
> upstream sooner, rather then later. But I think we should put them on
> hold until we have an agreement on a shared userspace API for this.
> 

I could maybe update the patch to expose the interface via debugfs like Mark
wants to do with lenovo driver and make update later when a common interface
will be fully defined.

I would prefer the patch to be merged (at lest the init function) because it
fix the thermald behaviour whit default thermal profile on fresh boot.

In the next days I will update the patch and send it in other thread to 
discuss and evaluate a merge in two steps

Best Regards
Elia






[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux