It did seem a bit odd that my fancy new 2.8GHz processor had troubles to seemlessly decode simple videos from youtube. The flash plugin process seemed to frequently change CPU and therefor hang every second or so. After investigating a bit i found the following:
Completely Fair Scheduler (task scheduler) introduced in 2.6.23 seems to be causing problems (I think it’s the scheduler??) on trying to set the up_threshold with ondemand. Let’s say you have 2 or more processors and a task that is running that wants 100% of a processor. The scheduler is now so “fair” it bounces the task from one CPU to the next which causes each CPU to never get above the default ondemand up_threshold of 80%. This causes the ondemand governor to never let any processor get to it’s full frequency and complete the task faster. Lowering the up_threshold to something like 20% fixes it. The task seems to stay on one processor long enough to get it above 20%. Then when it bounces back it’s already scaled up from the last bounce. This keeps it up until the process is complete for all cores.
The solution is to set the “cpufreq governor” to ondemand and adjust the up_threshold to a lower value to cause it to behave more nervously. In the apropriate startup script (/etc/init.d/ondemand in my case) set something like:
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq do [ -d $CPUFREQ ] || continue echo -n ondemand > $CPUFREQ/scaling_governor echo -n 20 > $CPUFREQ/ondemand/up_threshold done
