linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <matthewgarrett@google.com>
To: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Subject: Expose all known Intel DPTF policies
Date: Wed, 10 Oct 2018 01:30:05 -0700	[thread overview]
Message-ID: <20181010083007.239938-1-matthewgarrett@google.com> (raw)

Intel's Dynamic Platform and Thermal Framework is a combination
firmware/OS framework for allowing userland to implement more complex
thermal policies in conjunction with the platform firmware. The rough
gist is that the firmware exposes a set of information describing the
relationships between various heat generating and heat removing
components in the system, the OS makes a reasonable decision about what
sort of policy will work best given the constraints the system is
currently operating under and passes that decision back to the firmware,
and the firmware does some magic (potentially including reprogramming
various CPU MSRs) to match the OS policy. Depending on the policy, the
OS may then be responsible for ensuring that the system stays within the
appropriate thermal envelope.

Linux already has a driver that exposes the firmware interface for
setting the policy, but it's somewhat broken - it only exposes a very
small subset of the defined policies, and most new systems don't
intersect with the exposed ones (strangely, support for some policies
was actively removed in 31908f45a583e8f21db37f402b6e8d5739945afd). It
also doesn't actually /work/ on any new systems, since the PASSIVE_1
policy seems to have been replaced by the PASSIVE_2 policy and therefore
it's impossible to actually trigger a new UUID write.

The consequence of this right now is that various new systems (such as
most current Thinkpads) default to a safe policy that throttles the CPU
at a low temperature, dramatically reducing system performance. Since
Linux provides no mechanism to set any of the other policies the
platform supports, users are stuck. This patchset adds all the UUIDs
I've been able to find from scraping various ACPI tables, and fixes the
mode setting in order to make it possible to actually set the new modes.
It should be noted that this is nowhere near an actual solution - doing
this properly requires appropriate userspace management tooling, and
Intel haven't documented most of the ACPI information required to make
it possible to write such tooling. However, this is a first step in
making it possible to do that work.



             reply	other threads:[~2018-10-10  8:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10  8:30 Matthew Garrett [this message]
2018-10-10  8:30 ` [PATCH 1/2] thermal/int340x_thermal: Add additional UUIDs Matthew Garrett
2018-12-03 15:08   ` Zhang Rui
2019-01-23  0:44     ` Joel Stanley
2019-01-23  5:58       ` Zhang Rui
2018-10-10  8:30 ` [PATCH 2/2] thermal/int340x_thermal: fix mode setting Matthew Garrett

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=20181010083007.239938-1-matthewgarrett@google.com \
    --to=matthewgarrett@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).