From: Jonathan Nieder <jrnieder@gmail.com>
To: Dave Jones <davej@redhat.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: [BUG?] Moving drivers to drivers/cpufreq/ causes all to be loaded
Date: Sat, 13 Aug 2011 10:46:38 -0500 [thread overview]
Message-ID: <20110813154638.GA1494@elie.gateway.2wire.net> (raw)
In-Reply-To: <20110426181508.GB1908@redhat.com>
(-cc: linux-arm-kernel, +cc: linux-kernel, Mattia)
Hi,
Dave Jones wrote:
> in cpufreq.next I moved the x86 drivers over. Someone look it over ?
Some people[1] have been seeing regressions after this change (when
moving from 2.6.39 to 3.0, presumably from commit bb0a56ecc4ba,
"[CPUFREQ] Move x86 drivers to drivers/cpufreq/"). The first symptom
was messages at boot:
| Loading cpufreq kernel modules...FATAL: Error inserting powernow_k7 (/lib/modules/3.0.0-1-486/kernel/drivers/cpufreq/powernow-k7.ko): No such device
| FATAL: Error inserting speedstep_ich (/lib/modules/3.0.0-1-486/kernel/drivers/cpufreq/speedstep-ich.ko): No such device
| FATAL: Error inserting acpi_cpufreq (/lib/modules/3.0.0-1-486/kernel/drivers/cpufreq/acpi-cpufreq.ko): Device or resource busy
[etc]
The second symptom was the wrong cpufreq driver being loaded
(p4-clockmod instead of acpi-cpufreq). The cause seems to be some
code in init scripts that originated in powernowd 0.97-2ubuntu1 (2007)
or some time before that:
| #get list of available modules (governors and helpers)
| LOC="/lib/modules/$(uname -r)/kernel/drivers/cpufreq"
| if [ -d $LOC ]; then
| MODAVAIL=$( ( find $LOC -type f -name "*.o" -printf "basename %f .o\n"; \
| find $LOC -type f -name "*.ko" -printf "basename %f .ko\n" ) | /bin/sh)
| else
| MODAVAIL=""
| fi
|
| #echo "Loading cpufreq modules:"
| for mod in $MODAVAIL; do
| # echo " $mod"
| echo $LIST| grep -q -w "$mod" || modprobe $mod >/dev/null || /bin/true
| done
This takes all kernel modules in drivers/cpufreq, blindly assumes
they must be governors or helpers, and loads them. Nowadays it is
in the loadcpufreq script in cpufrequtils; so in cpufrequtils 007-2
(03 Aug 2011), the pattern changed to drivers/cpufreq/cpufreq_*.ko
which just matches the governors and helpers and everybody's happy.
Except:
(1) This is still incredibly fragile. What *should* cpufrequtils
be doing to get the drivers 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. Bad kernel, no biscuit.
Ideas?
[1] http://bugs.debian.org/635348
next parent reply other threads:[~2011-08-13 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110414094447.GA1611@n2100.arm.linux.org.uk>
[not found] ` <alpine.LFD.2.00.1104211629300.24613@xanadu.home>
[not found] ` <201104261605.26791.arnd@arndb.de>
[not found] ` <201104261904.45923.rjw@sisk.pl>
[not found] ` <20110426181508.GB1908@redhat.com>
2011-08-13 15:46 ` Jonathan Nieder [this message]
2011-08-13 19:02 ` Jonathan Nieder
2011-08-13 21:11 ` Dave Jones
2011-08-14 0:18 ` Mattia Dongili
2011-08-14 17:01 ` Jonathan Nieder
2011-08-14 17:17 ` Kay Sievers
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=20110813154638.GA1494@elie.gateway.2wire.net \
--to=jrnieder@gmail.com \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cpufreq@vger.kernel.org \
--cc=davej@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®