All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: cpufreq@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>, Tony Lindgren <tony@atomide.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Mattia Dongili <malattia@debian.org>
Subject: Re: [BUG?] Moving drivers to drivers/cpufreq/ causes all to be loaded
Date: Sat, 13 Aug 2011 17:11:42 -0400	[thread overview]
Message-ID: <20110813211142.GA1536@redhat.com> (raw)
In-Reply-To: <20110813190246.GA10412@elie.gateway.2wire.net>

On Sat, Aug 13, 2011 at 02:02:46PM -0500, Jonathan Nieder wrote:
 > Jonathan Nieder wrote:
 > 
 > >  (1) This is still incredibly fragile.  What *should* cpufrequtils
 > >      be doing to get the modules it needs?
 > >
 > >  (2) Using the 3.0 or later kernel with old userspace gives bad
 > >      results (e.g., 30% increase in power consumption for one
 > >      reporter).  That's a regression.
 > 
 > The "30% increase" part was an unrelated bug (i915.i915_enable_rc6=1
 > brings power consumption back to normal), for those who were
 > wondering. :)
 > 
 > Old userspace automatically loading the wrong cpufreq drivers still
 > does not seem great to me, though I don't have any great ideas about
 > how to prevent that (a separate drivers/cpufreq-drivers/ directory
 > does not sound too appealing).  I guess I'd be most interested in how
 > to fix (1) first.

If we have to move stuff again, we could do drivers/cpufreq/x86/ etc..
Even if we do that though, you really want to fix that userspace, because
you're right that "load everything and see what sticks" is fragile,
and pure luck that it ever did the right thing.

What we used to do in Fedora grew more and more complex over time.
Here's the last incarnation: http://fpaste.org/uvDb/
As you can see in the start() function, it's pretty hairy, and even
that doesn't cover every possible case, which is why it allows a user
override in the $DRIVER variable. Messy.

Basic thinking is
- If AMD64, load powernow-k8
- if that fails to load : try acpi-cpufreq
- For everything else : acpi-cpufreq
- If acpi-cpufreq fails : p4-clockmod

What we're moving towards for Fedora 16 is to change all the drivers
to be linked in rather than modular, and rely on link order to do the right thing.
It sounds like a step backwards in some ways, towards the 'see what sticks'
approach, but the difference here is the link-order specifying the correct
order for initialisation. You get none of that with modules.

In an ideal world, we'd auto-load the right module on a hotplug event
from a cpu, but we're not there yet. I believe Kay is working on that.

Over time, 'the right driver' seems to be converging on acpi-cpufreq.
There's some patches pending to even move some of the powernow-k8 use-cases
to use acpi-cpufreq instead. But modern intel should be using that,
(where modern = almost everything since p4, except those that lack P-states)


And then there's the 'which governor' mess.
I'd really like that to eventually converge so that 'ondemand' is always the
right answer.  For this to happen, there needs to be no difference between
an idle machine running powersave, and ondemand or (harder) a busy machine
running performance.
(conservative with some work could be just a runtime mode for ondemand).

	Dave


  reply	other threads:[~2011-08-13 21:11 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14  9:44 Status of arch/arm in linux-next Russell King - ARM Linux
2011-04-14 11:08 ` Tony Lindgren
2011-04-14 12:02   ` Russell King - ARM Linux
2011-04-14 12:31     ` Tony Lindgren
2011-04-14 14:20       ` Mark Brown
2011-04-14 14:26         ` Tony Lindgren
2011-04-14 14:31         ` Russell King - ARM Linux
2011-04-14 18:32           ` Mark Brown
2011-04-15 15:12       ` Grant Likely
2011-04-15 15:56         ` Russell King - ARM Linux
2011-04-15 16:10           ` Grant Likely
2011-04-16  8:28             ` Russell King - ARM Linux
2011-04-16 16:57               ` Mark Brown
2011-04-18  8:10                 ` Tony Lindgren
2011-04-18 13:57                   ` Mark Brown
2011-04-18 14:41                     ` Tony Lindgren
2011-04-18 14:41                       ` Tony Lindgren
2011-04-18 15:58                       ` Mark Brown
2011-04-18 15:58                         ` Mark Brown
2011-04-18 17:18                     ` Russell King - ARM Linux
2011-04-18 20:23                       ` Mark Brown
2011-04-18 21:40                         ` Thomas Gleixner
2011-04-18 23:55                           ` Mark Brown
2011-04-14 14:07     ` Mark Brown
2011-04-15  2:59     ` Nico Erfurth
2011-04-15  8:21       ` Nicolas Ferre
2011-04-15 13:13         ` Nico Erfurth
2011-04-15  1:16 ` Linus Walleij
2011-04-15  6:26   ` Tony Lindgren
2011-04-19 14:16     ` Arnd Bergmann
2011-04-19 14:50       ` Mark Brown
2011-04-19 14:55         ` Arnd Bergmann
2011-04-19 15:04           ` Mark Brown
2011-04-19 15:14           ` Linus Walleij
2011-04-19 16:01             ` Arnd Bergmann
2011-04-19 16:01               ` Arnd Bergmann
2011-04-19 16:05               ` Mark Brown
2011-04-19 16:05                 ` Mark Brown
2011-04-21 20:14                 ` Dave Jones
2011-04-21 20:14                   ` Dave Jones
2011-04-21 21:02                   ` Nicolas Pitre
2011-04-21 21:02                     ` Nicolas Pitre
2011-04-22  7:17                     ` Tony Lindgren
2011-04-22  7:17                       ` Tony Lindgren
2011-04-26 14:05                     ` Arnd Bergmann
2011-04-26 14:05                       ` Arnd Bergmann
2011-04-26 17:04                       ` Rafael J. Wysocki
2011-04-26 17:04                         ` Rafael J. Wysocki
2011-04-26 18:15                         ` Dave Jones
2011-04-26 18:15                           ` Dave Jones
2011-04-29 20:15                           ` Dave Jones
2011-04-29 20:15                             ` Dave Jones
2011-04-30  0:05                             ` Nicolas Pitre
2011-04-30  0:05                               ` Nicolas Pitre
2011-08-13 15:46                           ` [BUG?] Moving drivers to drivers/cpufreq/ causes all to be loaded Jonathan Nieder
2011-08-13 19:02                             ` Jonathan Nieder
2011-08-13 21:11                               ` Dave Jones [this message]
2011-08-14  0:18                                 ` Mattia Dongili
2011-08-14  0:18                                   ` Mattia Dongili
2011-08-14 17:01                                 ` Jonathan Nieder
2011-08-14 17:17                                   ` Kay Sievers
2011-08-14 17:17                                     ` Kay Sievers
2011-05-01 23:02                       ` Status of arch/arm in linux-next Jamie Lokier
2011-05-01 23:02                         ` Jamie Lokier
2011-04-19 16:27               ` Dave Jones
2011-04-19 16:27                 ` Dave Jones
2011-04-19 17:12                 ` Arnd Bergmann
2011-04-19 17:12                   ` Arnd Bergmann
2011-04-20  6:36                 ` Linus Walleij
2011-04-20  6:36                   ` Linus Walleij
2011-04-21  7:32             ` Linus Walleij
2011-04-21  8:25               ` Arnd Bergmann
2011-04-22  7:56                 ` Linus Walleij
2011-04-22 11:46                   ` Linus Walleij
2011-05-02 13:49                   ` Samuel Ortiz
2011-05-02 19:21                     ` Linus Walleij
2011-04-20  7:33       ` Tony Lindgren
2011-04-20  7:43         ` Arnd Bergmann
2011-04-15 14:30 ` Martin Guy
2011-04-15 15:50   ` Russell King - ARM Linux
2011-04-18 15:17 ` Alexey Zaytsev
2011-04-18 16:23   ` Linus Torvalds
2011-04-18 21:54     ` Alexey Zaytsev
2011-04-19 15:02       ` Linus Torvalds
2011-04-19 15:20         ` Jean-Christophe PLAGNIOL-VILLARD

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=20110813211142.GA1536@redhat.com \
    --to=davej@redhat.com \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=malattia@debian.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=rjw@sisk.pl \
    --cc=tony@atomide.com \
    /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.