All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: "Limonciello, Mario" <Mario.Limonciello@dell.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Mark Gross <mgross@linux.intel.com>
Cc: Mark Pearson <mpearson@lenovo.com>,
	Elia Devito <eliadevito@gmail.com>,
	Benjamin Berg <bberg@redhat.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"platform-driver-x86@vger.kernel.org" 
	<platform-driver-x86@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mark Pearson <markpearson@lenovo.com>
Subject: Re: [RFC] Documentation: Add documentation for new performance_profile sysfs class
Date: Wed, 07 Oct 2020 18:34:55 +0200	[thread overview]
Message-ID: <c73ffad8fd6bff8ff20d91930b097bff82be1c8f.camel@hadess.net> (raw)
In-Reply-To: <DM6PR19MB26364E6AA2F51981F592CE58FA0A0@DM6PR19MB2636.namprd19.prod.outlook.com>

On Wed, 2020-10-07 at 15:58 +0000, Limonciello, Mario wrote:
>  
> > On Mon, 2020-10-05 at 12:58 +0000, Limonciello, Mario wrote:
> > > > On modern systems CPU/GPU/... performance is often dynamically
> > > > configurable
> > > > in the form of e.g. variable clock-speeds and TPD. The
> > > > performance
> > > > is often
> > > > automatically adjusted to the load by some automatic-mechanism
> > > > (which may
> > > > very well live outside the kernel).
> > > > 
> > > > These auto performance-adjustment mechanisms often can be
> > > > configured with
> > > > one of several performance-profiles, with either a bias towards
> > > > low-power
> > > > consumption (and cool and quiet) or towards performance (and
> > > > higher
> > > > power
> > > > consumption and thermals).
> > > > 
> > > > Introduce a new performance_profile class/sysfs API which
> > > > offers a
> > > > generic
> > > > API for selecting the performance-profile of these automatic-
> > > > mechanisms.
> > > > 
> > > 
> > > If introducing an API for this - let me ask the question, why
> > > even let each
> > > driver offer a class interface and userspace need to change
> > > "each" driver's
> > > performance setting?
> > > 
> > > I would think that you could just offer something kernel-wide
> > > like
> > > /sys/power/performance-profile
> > > 
> > > Userspace can read and write to a single file.  All drivers can
> > > get notified
> > > on this sysfs file changing.
> > > 
> > > The systems that react in firmware (such as the two that prompted
> > > this discussion) can change at that time.  It leaves the
> > > possibility for a
> > > more open kernel implementation that can do the same thing though
> > > too by
> > > directly modifying device registers instead of ACPI devices.
> > 
> > The problem, as I've mentioned in previous discussions we had about
> > this, is that, as you've seen in replies to this mail, this would
> > suddenly be making the kernel apply policy.
> > 
> > There's going to be pushback as soon as policy is enacted in the
> > kernel, and you take away the different knobs for individual
> > components
> > (or you can control them centrally as well as individually). As
> > much as
> > I hate the quantity of knobs[1], I don't think that trying to
> > reduce
> > the number of knobs in the kernel is a good use of our time, and
> > easier
> > to enact, coordinated with design targets, in user-space.
> > 
> > Unless you can think of a way to implement this kernel wide setting
> > without adding one more exponent on the number of possibilities for
> > the
> > testing matrix, I'll +1 Hans' original API.
> > 
> Actually I offered two proposals in my reply.  So are you NAKing
> both?

No, this is only about the first portion of the email, which I quoted.
And I'm not NAK'ing it, but I don't see how it can work without being
antithetical to what kernel "users" expect, or what the folks consuming
those interfaces (presumably us both) would expect to be able to test
and maintain.

> The other one suggested to use the same firmware attributes class
> being
> introduced by the new Dell driver ( 
> https://patchwork.kernel.org/patch/11818343/)
> since this is actually a knob to a specific firmware setting.

This seemed to me like an implementation detail (eg. the same metadata
is being exported, but in a different way), and I don't feel strongly
about it either way.


  reply	other threads:[~2020-10-07 16:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03 13:19 [RFC 0/1] Documentation: Add documentation for new performance_profile sysfs class Hans de Goede
2020-10-03 13:19 ` [RFC] " Hans de Goede
2020-10-04  1:33   ` [External] " Mark Pearson
2020-10-04 22:29   ` Elia Devito
2020-10-09 10:52     ` Hans de Goede
2020-10-05 12:58   ` Limonciello, Mario
2020-10-05 14:19     ` Barnabás Pőcze
2020-10-05 16:11       ` Limonciello, Mario
2020-10-05 16:47         ` [External] " Mark Pearson
2020-10-05 16:56           ` Limonciello, Mario
2020-10-05 17:46             ` Mark Pearson
2020-10-07 11:51     ` Bastien Nocera
2020-10-07 15:58       ` Limonciello, Mario
2020-10-07 16:34         ` Bastien Nocera [this message]
2020-10-07 18:41           ` Limonciello, Mario
2020-10-12 16:42             ` Rafael J. Wysocki
2020-10-13 13:09               ` Hans de Goede
2020-10-14 13:55                 ` Rafael J. Wysocki
2020-10-14 14:16                   ` Hans de Goede
2020-10-14 15:46                     ` Rafael J. Wysocki
2020-10-14 17:44                       ` Elia Devito
2020-10-14 18:11                         ` Limonciello, Mario
2020-10-09 11:33     ` Hans de Goede
2020-10-05 13:13   ` Benjamin Berg
2020-10-09 11:15     ` Hans de Goede
2020-10-03 13:39 ` [RFC 0/1] " Hans de Goede

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=c73ffad8fd6bff8ff20d91930b097bff82be1c8f.camel@hadess.net \
    --to=hadess@hadess.net \
    --cc=Mario.Limonciello@dell.com \
    --cc=andy@infradead.org \
    --cc=bberg@redhat.com \
    --cc=dvhart@infradead.org \
    --cc=eliadevito@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=markpearson@lenovo.com \
    --cc=mgross@linux.intel.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.