Description of problem: g-p-m sets the /sys/devices/system/cpu/cpuX/cpufreq/ondemand/up_threshold value to 31 when on AC. This is not a good value (the default 80 is a LOT better for any scenario); in fact it is extremely questionable that g-p-m even touches this value at all! I would like to request that g-p-m, when on AC, at least uses 80 or higher for this value; it's also a good question to find out why 31 was used in the first place... if there was no good reason (or there was a reason that no longer is valid) I would like to request that g-p-m just leaves this value alone.
(just as background; in principle the ondemand governer will go to max frequency if the current application is running into a performance boundary at the current frequency. As such the theoretical value for up_threshold is 100. However to allow a little bit slack due to measurement errors (until 2.6.23, the cpu usage was not super accurate), a 20% slack value was used, so up_threshold was set to 80. up_threshold was a debug knob for ondemand developers, and it was never intended nor imagined to be a user tunable; the value "31" surely makes no sense, there isn't ever going to be a 69% measurement error, nor does it make sense to have a different value for AC and DC; the measurement error isn't going to depend on being on AC or DC unless you have a kernel which has a different internal tick rate for AC versus DC, and Linux never had that)
Richard, why? Thanks.
Well, the consensus at the time was to tweak the performance for battery and ac states as this would affect the latency. I was told to use 85% for AC and 25% for battery. g-p-m sets the performance through HAL, so if 85% isn't mapped correctly, it's probably a hal addon bug.
ok what ends up happening is not that the performance is tweaked, but that the measurement error slack is tweaked. Note: With ondemand, there really is no need to tweak any performance at all. Maybe the hal code should just not do anything. (With userspace governer.. different story obviously) In addition; I think it's a fundamental mistake to tune AC-vs-battery, because that implies that power consumption is not important for the AC case, which is absolutely incorrect (just ask any datacenter sysadmin).... So.. is this a hal bug because it tunes some random different meaning sysfs tunable (heck, since it tries to tune anything at all) or is there a more fundamental issue around what to do in general here.
Sure, I'm with you on the saving power on AC thing. I was told this would affect latency - i.e. a snappier system on AC than battery. Is this incorrect? This sounds like a HAL bug, but I'm wondering if g-p-m shouldn't just leave cpufreq alone completely.
What ends up being set in the end doesn't really impact latency. (if one wanted to tweak latency then other values should have been tweaked, not this one). Ondemand is very agressive anyway already in ramping speed up when needed anyway, realistically it doesn't require any tuning at all. I agree with the notion that g-p-m should leave cpufreq alone, at least normally. I can see a point where a user gets to see a knob that says "get me maximum performance no matter what", which would just switch governer (but then again, ondemand does a pretty good job of going to full speed when needed anyway)... but other than that... ondemand (and any other cpufreq policy) should "Just Work" without handholding or tuning.
(at this point, while BZ still says gpm, I'm not clear if it's a hal thing, or a gpm thing, or miscommunication between both; since all interested folks are on this bug anyway that's no big deal)
Should Fedora bugs be on the Intel5.2Features tracker ?
Not really, but it will help me not lose this until we have a RHEL5 issue submitted, if that's okay.
Richard, David, which one is it ? gpm bug or hal bug ? and can we fix it ?
Cloned bug #354641 for tracking on RHEL5.
mclasen: it's both. It's a HAL bug because it's setting the wrong tunable, and a gnome-power-manager bug because it probably should just leave the policy to ondemand no matter what the user says. I'm really tempted to rip out the CPU freq stuff from g-p-m trunk.
Yeah. I'm thinking just disabling the power management stuff from the hal builds too. Should be as simple as configuring the sources using --without-cpufreq. Arjan, would this work for you?
It's basically the right thing; it sounds nice in theory for all to bother with this stuff, in practice it doesn't work well because there really isn't/shouldn't be anything to tune in the first place.
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
g-p-m doesn't touch any of the cpufreq stuff anymore upstream.
Can this be closed now?