On 10/11/15 09:58, Leo Yan wrote:
When calculate new CPU capacity index, need update the eenv->cap_idx, which will be used for group_norm_usage(). Otherwise it will calculate with zero.
Signed-off-by: Leo Yan leo.yan@linaro.org
kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6203a20..ce293ff 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5032,12 +5032,13 @@ static int find_new_capacity(struct energy_env *eenv, unsigned long util = group_max_usage(eenv);
for (idx = 0; idx < sge->nr_cap_states; idx++) {
if (sge->cap_states[idx].cap >= util)
if (sge->cap_states[idx].cap >= util) {
eenv->cap_idx = idx; return idx;
}
Nice catch! We also figured this out in the meantime so it's part of EAS RFC 5.2 .
} eenv->cap_idx = idx;
return idx;
}
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.