Hi,
On Tue, Jul 15, 2014 at 9:25 AM, Mohammad Merajul Islam Molla meraj.enigma@gmail.com wrote:
Hi,
I was looking at the code of cpuidle menu governor. Have some queries regarding the function performance_multiplier().
In mainline kernel it does -
mult += 2 * get_loadavg();
However, in linux-linaro-tracking, its commented out with below comment - /* * this doesn't work as intended - it is almost always 0, but can * sometimes, depending on workload, spike very high
into the hundreds * even when the average cpu load is under 10%. */ /* mult += 2 * get_loadavg(); */
Does this change need to be upstreamed?
In general the optimal multipliers depend on hardware and use case. Trying to upstream the above would probably be rejected without additional details about the problem described in the comment.
In the next line the code does -
/* for IO wait tasks (per cpu!) we add 5x each */ mult += 10 * nr_iowait_cpu(smp_processor_id());
Why is the multiplication by 10? Is the code assuming there are
only 2 cpus (2 * 5)?
Should it be mult += 5 * nr_iowait(); as per comment? or for_each_online_cpu(cpu) mult += 5 * nr_iowait_cpu(cpu); since we probably want to consider only online cpus?
Former, in this case the comment and the code disagree about the multiplier.
-- Thanks, -Meraj
There is widespread consensus within Linaro PMWG that the whole of performance_multiplier() is not really useful. Replacing it all with something that makes more sense rather than trying to tweak multipliers is our long term goal. Currently the value returned by the function is only used to limit the minimum predicted idle duration to state exit latency ratio. That means that even with very high amount of tasks/IO, a very deep state could be chosen if the next timer is far to the future. (Read: this design is flawed.) As we are pushing towards scheduler-driven idle, the performance_multiplier is likely to go away and upstreaming any of these changes is not useful.
Tuukka
linaro-kernel mailing list linaro-kernel@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-kernel