All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elia Devito <eliadevito@gmail.com>
To: Mark Pearson <markpearson@lenovo.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Bastien Nocera <hadess@hadess.net>,
	Mark Pearson <mpearson@lenovo.com>,
	Benjamin Berg <bberg@redhat.com>
Cc: Jared Dominguez <jaredz@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [External] Re: RFC: offering a standardized (/sys/class) userspace API for selecting system/laptop performance-profiles
Date: Mon, 21 Sep 2020 11:03:55 +0200	[thread overview]
Message-ID: <9766663.nUPlyArG6x@pce> (raw)
In-Reply-To: <261328975238951d0412727220a1b7d915cebb99.camel@redhat.com>

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




  reply	other threads:[~2020-09-21  9:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 11:22 RFC: offering a standardized (/sys/class) userspace API for selecting system/laptop performance-profiles Hans de Goede
2020-09-17 11:50 ` Bastien Nocera
2020-09-17 12:51   ` Hans de Goede
2020-09-17 13:00     ` Bastien Nocera
2020-09-17 13:50     ` Benjamin Berg
2020-09-17 13:54       ` Hans de Goede
2020-09-17 14:10         ` Benjamin Berg
2020-09-17 16:58           ` [External] " Mark Pearson
2020-09-17 17:03             ` Hans de Goede
2020-09-17 17:16               ` Mark Pearson
2020-09-17 18:16                 ` Benjamin Berg
2020-09-21  9:03                   ` Elia Devito [this message]
2020-09-22 10:43                     ` Hans de Goede
2020-09-24  2:10                       ` Mark Pearson
2020-09-24  8:21                         ` Hans de Goede
2020-09-24 11:48                     ` Benjamin Berg
2020-09-22 10:30                 ` Hans de Goede
2020-09-24  1:44                   ` Mark Pearson
2020-09-17 13:36   ` Mark Pearson
2020-09-17 14:04     ` Hans de Goede
2020-09-17 16:51       ` Mark Pearson
2020-09-17 12:22 ` Benjamin Berg
2020-09-17 12:45   ` Hans de Goede
2020-09-17 13:07     ` Bastien Nocera
2020-09-17 13:46       ` Hans de Goede
2020-09-17 13:02 ` Barnabás Pőcze
2020-09-17 13:24   ` Hans de Goede
2020-09-17 13:28     ` Bastien Nocera
2020-09-17 13:51       ` Hans de Goede
2020-09-17 13:59     ` Benjamin Berg

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=9766663.nUPlyArG6x@pce \
    --to=eliadevito@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bberg@redhat.com \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=jaredz@redhat.com \
    --cc=markpearson@lenovo.com \
    --cc=mpearson@lenovo.com \
    --cc=platform-driver-x86@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.