linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@us.ibm.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Thomas Renninger <trenn@suse.de>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0
Date: Tue, 28 Apr 2009 12:33:04 -0700	[thread overview]
Message-ID: <20090428193303.GC6968@plum> (raw)
In-Reply-To: <20090416224507.GA31984@srcf.ucam.org>

On Thu, Apr 16, 2009 at 11:45:07PM +0100, Matthew Garrett wrote:

> That's not really an option. It works with Windows.

Who verified that?  Does anyone know what strategy Windows uses to avoid this
T60 problem?  

> Please figure out how to make it work on everything rather than us just
> repeatedly toggling between different sets of broken machines or being forced
> to have a static table of machines.

I've thought about this for a while and still don't know how to proceed with
this suggestion.  Right now we have:

1. Linux, which right now does not read _PPC at boot time regardless of the
ignore_ppc setting, leaving the kernel's copy set to 0 regardless of what the
BIOS wants the kernel to do.  The kernel will pick up the correct value of _PPC
if the BIOS sends a "re-evaluate _PPC" event.

Obviously, if ignore_ppc=1 then we should ignore _PPC, but I'm talking about
_PPC not being read when ignore_ppc=0 or ignore_ppc isn't set at all.

2. A whole lot of machines that set _PPC to 0 all the time; this scenario
works because _PPC and the cpufreq max_freq controls just happen to match.

3. A smaller collection of machines that leave _PPC at 0 except for special
circumstances that warrant freq/voltage restrictions (power overage,
thermal/power throttling via p-state, etc.)

This is a problem for the following sequence:

  1. BIOS decides to set _PPC to any non-zero value.
  2. The kernel boots with ignore_ppc=0, doesn't check _PPC, and runs with
     all p-states enabled.

      <here is where we're running with the wrong _PPC and potentially
       using more power/putting out more heat than the firmware wants>

  3. BIOS changes _PPC to something else and sends a Notify event.
  4. Kernel now runs with the correct p-state restrictions.

4. Broken T60s where the EC (which is read in the _PPC method) freaks out and
returns 2 all the time.  If you set ignore_ppc=1 then you get the full range of
speeds even if the BIOS doesn't want to allow it.  Clearly the firmware needs
some sort of fix, which means that we could Lenovo, which may or may not
succeed because T60s were discontinued 18 months ago.

I can think of a few ways to proceed with the kernel:

1. No changes at all.  If ignore_ppc = 0 and _PPC != 0 when the kernel boots,
the kernel ignores the BIOS.  That seems broken to me.

2. Add my revert patch, which leaves the ignore_ppc toggle in place for T60
owners.  This doesn't satisfy the "no toggling" rule, but at least there's
still an override for when the automatic method doesn't work.

3. Add the revert patch and put in a DMI check to turn on ignore_ppc for all
T60s.  This doesn't satisfy the "static table" constraint though at least it
requires less manual intervention.

I'd rather have the kernel work for the vast majority of machines that do not
freak out, and special case the ones that do.  But I'm not clever enough to
figure out a solution that fixes the runs-with-wrong-_PPC problem, avoids
reading _PPC on machines that freak out, and doesn't involve blacklists or a
toggle.  Any suggestions?

--D

  parent reply	other threads:[~2009-04-28 19:33 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-15 22:53 [PATCH] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0 Darrick J. Wong
2009-04-16  0:27 ` [PATCH v2] " Darrick J. Wong
2009-04-16 10:01   ` Thomas Renninger
2009-04-16 10:32     ` Ingo Molnar
2009-04-16 17:42     ` Darrick J. Wong
2009-04-16 18:49       ` Thomas Renninger
2009-04-16 22:45       ` Matthew Garrett
2009-04-20  5:13         ` Len Brown
2009-04-20  9:13           ` Thomas Renninger
2009-04-20 10:45             ` Ingo Molnar
2009-04-29 13:19               ` Thomas Renninger
2009-04-29 14:48                 ` Ingo Molnar
2009-04-29 21:43                 ` Darrick J. Wong
2009-04-30  9:07                   ` Thomas Renninger
2009-04-30  9:17                     ` Ingo Molnar
2009-04-20 22:18             ` Henrique de Moraes Holschuh
2009-04-28 19:33         ` Darrick J. Wong [this message]
2009-04-28 19:53           ` Matthew Garrett
2009-04-28 20:24             ` Darrick J. Wong
2009-04-29 21:39             ` Darrick J. Wong
2009-04-29 22:00               ` Matthew Garrett
2009-04-30  7:25                 ` Ingo Molnar
2009-04-30  9:54                   ` Matthew Garrett
2009-04-30 11:10                     ` Ingo Molnar
2009-04-30 11:13                       ` Matthew Garrett
2009-05-15 19:12                         ` Darrick J. Wong
2009-06-02 23:21                           ` Darrick J. Wong
2009-06-07 10:05                             ` Ingo Molnar
2009-07-15  0:32                               ` Darrick J. Wong
2010-02-16 22:07                                 ` Matthew Garrett
2010-02-16 22:26                                   ` Darrick J. Wong
2010-02-18  9:02                                     ` Len Brown
2010-02-18 18:28                                       ` Darrick J. Wong
2010-02-19  6:12                                         ` Len Brown

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=20090428193303.GC6968@plum \
    --to=djwong@us.ibm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mjg59@srcf.ucam.org \
    --cc=trenn@suse.de \
    /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).