On Jan 27, 2008 9:38 PM, Michael Biebl <[EMAIL PROTECTED]> wrote:
> Actually, I think the current logic is broken. If we can't find
> TEMPORARY_CPUFREQ_GOVERNOR in
> /sys/devices/system/cpu/cpu$x/cpufreq/scaling_governor, we fall back
> uncoditionally to userspace (or with your patch performance) and it's
> possible that this fallback governor is not available. The best bet in
> that case is simply to not change the governor at all.
Point. Patch against the rest of my patch series attached.
> And again, a better default governor for TEMPORARY_CPUFREQ_GOVERNOR
> would be performance imho.
OK, fine. :)
> Cheers,
>
> Michael
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
>
diff -U 5 -rNX /home/victor/pm-utils/trunk/diffignore pm-utils.updates/pm/functions working/pm/functions
--- pm-utils.updates/pm/functions 2008-01-27 21:01:05.000000000 -0600
+++ working/pm/functions 2008-01-27 21:47:43.000000000 -0600
@@ -13,11 +13,11 @@
HIBERNATE_MODE="platform"
HIBERNATE_RESUME_POST_VIDEO=no
INHIBIT=/var/run/pm-utils.inhibit
PM_LOGFILE=${PM_LOGFILE:=/var/log/pm-suspend.log}
SUSPEND_MODULES=""
-TEMPORARY_CPUFREQ_GOVERNOR="userspace"
+TEMPORARY_CPUFREQ_GOVERNOR="performance"
LOCKDIR="/tmp/.suspended"
# Use c sort order
export LC_COLLATE=C
diff -U 5 -rNX /home/victor/pm-utils/trunk/diffignore pm-utils.updates/pm/sleep.d/94cpufreq working/pm/sleep.d/94cpufreq
--- pm-utils.updates/pm/sleep.d/94cpufreq 2008-01-27 21:01:05.000000000 -0600
+++ working/pm/sleep.d/94cpufreq 2008-01-27 21:45:32.000000000 -0600
@@ -6,24 +6,24 @@
{
[ -d /sys/devices/system/cpu/ ] || return 1
( cd /sys/devices/system/cpu/
for x in cpu[0-9]* ; do
[ -f "$x/cpufreq/scaling_governor" ] || continue
+ grep -q "$TEMPORARY_CPUFREQ_GOVERNOR" \
+ "$x/cpufreq/scaling_available_governors" || continue
savestate "${x}_governor" $(cat "$x/cpufreq/scaling_governor")
- local gov="$TEMPORARY_CPUFREQ_GOVERNOR"
- grep -q "$gov" "$x/cpufreq/scaling_available_governors" \
- || gov="performance"
- echo "$gov" > "$x/cpufreq/scaling_governor"
+ echo "$TEMPORARY_CPUFREQ_GOVERNOR" > \
+ "$x/cpufreq/scaling_governor"
done )
}
thaw_cpufreq()
{
( cd /sys/devices/system/cpu/
for x in cpu[0-9]* ; do
local gov=$(restorestate "${x}_governor")
- [ -z "$gov" ] && break
+ [ -z "$gov" ] || continue
echo "$gov" > "$x/cpufreq/scaling_governor"
done )
}
case "$1" in
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils