Hi,
I was looking at the code of cpuidle menu governor. Have some queries regarding the function performance_multiplier().
1. 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?
2. 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?
-- Thanks, -Meraj