LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: linux-pm@lists.linux-foundation.org
Cc: Pierre Ossman <drzeus-list@drzeus.cx>,
	Pavel Machek <pavel@ucw.cz>, LKML <linux-kernel@vger.kernel.org>,
	Adam Belay <abelay@novell.com>, Andi Kleen <andi@firstfloor.org>,
	Lee Revell <rlrevell@joe-job.com>
Subject: Re: [linux-pm] [PATCH] cpuidle: avoid singing capacitors
Date: Wed, 12 Mar 2008 15:11:17 -0400	[thread overview]
Message-ID: <200803121511.17389.lenb@kernel.org> (raw)
In-Reply-To: <20080310134915.45ae7446@mjolnir.drzeus.cx>


> > USB keeps processor out of C3 in many cases.
> 
> I figured that was the case. But I did not see any difference in powertop.

Modern Intel mobile processors have a feature called "C2 popup"
that allows the processor to retire DMA from C3 without
breaking into C0.  Instead the processor pops up to C2
where the cache snoop can allow the DMA to retire --
then it returns to C3, all transparent to software.

That is why powertop does not see it.

> > > 4. Battery and AC
> > > 
> > > The noise increases with the battery present and also when the AC supply is removed.
> > >
> > 
> > On battery, some machines swap C3 for "secret" C4, which is slower but
> > saves power.

ak> Normally such things are not visible in the DSDT, but hidden in SMM traps.

no, this mechanism is totally visible to the OS via a _CST re-evaluation on AC/DC transition.

This is very commmon, as the reference BIOS code does it.
It isn't a secret.  There are two common techniques -- either
re-define C3 to enter hardware C4, or simply add C4 as 4th C-state.

> I guess the only way to find out is to disassemble the DSDT. Exposing myself to such concentrations of ACPI is not an appealing project. :/

the latest cpuidle code actually publishes the details of the C-states being used.
 
$ pwd
/sys/devices/system/cpu/cpu0/cpuidle/state3
$ grep . *
desc:ACPI FFH INTEL MWAIT 0x20
latency:17
name:C3
power:250
time:1862590932
usage:9028970

You'll see "desc" change if ACPI pulls a _CST change on you.

> Disabling the second core makes the noise go away. This might be a subset of 1., as I've been told that a stopped core enters C1.

if you disable it at run-time, Linux puts it in C1.
If you never boot it in the first place (eg. maxcpusp=1), the BIOS leaves it in the deepest available C-sate.

The former will prevent the package from entering a deep package C-state,
as c-states are coordinated in hardware.  The later will allow the package
to enter whatever C-state the running core chooses.
 
> Changing HZ and NO_HZ has no noticeable effect on the problem (except the odd behaviour in 2.).
> This is further supported by the fact that Windows also has the problem (which should behave close to 100 HZ without NO_HZ). 
> 
> 
> So for now, the only viable workaround is processor.max_cstate....

yup, that's why we put it in.  Is it insufficient?

-Len


  parent reply	other threads:[~2008-03-12 19:12 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 18:38 [RFC][PATCH] " Pierre Ossman
2008-02-29 21:44 ` Lennart Sorensen
2008-03-01 12:31   ` Pierre Ossman
2008-03-01 13:40 ` Pierre Ossman
2008-03-02  2:27 ` Lee Revell
2008-03-02 14:17   ` Pierre Ossman
2008-03-03 12:36 ` Andi Kleen
2008-03-03 20:18 ` [PATCH] " Pierre Ossman
2008-03-03 20:46   ` Pavel Machek
2008-03-03 21:03     ` Pierre Ossman
2008-03-03 21:08       ` Pavel Machek
2008-03-03 21:14         ` Pallipadi, Venkatesh
2008-03-03 21:17           ` Pierre Ossman
2008-03-03 22:04             ` Pallipadi, Venkatesh
2008-03-03 23:05               ` [linux-pm] " Alan Stern
2008-03-03 23:10                 ` Andi Kleen
2008-03-04  4:00                   ` Dave Jones
2008-03-04  6:14                     ` Pierre Ossman
2008-03-04 17:19                       ` Pierre Ossman
2008-03-04 17:29                         ` Andi Kleen
2008-03-04 17:30                           ` Pierre Ossman
2008-03-04 17:43                             ` Andi Kleen
2008-03-04 18:04                               ` Pierre Ossman
2008-03-04 18:34                                 ` Andi Kleen
2008-03-05  6:04                                   ` Pierre Ossman
2008-03-05 15:48                                     ` Andi Kleen
2008-03-05 16:53                                       ` Pierre Ossman
2008-03-05 17:32                                         ` Andi Kleen
2008-03-04 19:01                         ` Pallipadi, Venkatesh
2008-03-05  6:02                           ` Pierre Ossman
2008-03-05  8:40                             ` Pierre Ossman
2008-03-05  9:03                               ` Pavel Machek
2008-03-05 13:42                                 ` Pierre Ossman
2008-03-05 13:47                                   ` Pavel Machek
2008-03-05 13:52                                     ` Pierre Ossman
2008-03-06  8:27                               ` Pierre Ossman
2008-03-09 14:16                                 ` Pierre Ossman
2008-03-09 18:19                                   ` Rafael J. Wysocki
2008-03-09 18:50                                   ` Alan Stern
2008-03-09 19:30                                   ` Henrique de Moraes Holschuh
2008-03-09 20:14                                     ` Pierre Ossman
2008-03-09 20:41                                       ` Henrique de Moraes Holschuh
2008-03-09 20:54                                         ` Henrique de Moraes Holschuh
2008-03-10 10:00                                   ` Pavel Machek
2008-03-10 12:49                                     ` Pierre Ossman
2008-03-10 13:04                                       ` Andi Kleen
2008-03-10 13:29                                         ` Pierre Ossman
2008-03-12 19:11                                       ` Len Brown [this message]
2008-03-13  8:10                                         ` Pavel Machek
2008-03-13 10:42                                           ` Andi Kleen
2008-03-14  4:13                                             ` Len Brown
2008-03-13 16:34                                         ` Pierre Ossman
2008-03-13 16:47                                           ` Pallipadi, Venkatesh
2008-03-13 17:44                                             ` Pierre Ossman
2008-03-13 17:49                                           ` Pierre Ossman
2008-03-14 19:40                                           ` Pierre Ossman
2008-03-14 21:15                                             ` Pallipadi, Venkatesh
2008-03-15  0:41                                               ` Pierre Ossman
2008-03-11  7:51                                   ` Pierre Ossman
2008-03-11 10:48                                     ` Andi Kleen
2008-03-11 15:20                                       ` Pierre Ossman
2008-03-11 17:31                                         ` Pierre Ossman
2008-03-12 19:17                                       ` Len Brown
2008-03-12 20:31                               ` Len Brown
2008-03-04  9:40                     ` Andi Kleen
2008-03-03 23:09               ` Andi Kleen

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=200803121511.17389.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=abelay@novell.com \
    --cc=andi@firstfloor.org \
    --cc=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=rlrevell@joe-job.com \
    --subject='Re: [linux-pm] [PATCH] cpuidle: avoid singing capacitors' \
    /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

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).