Hi list,
I am trying to porting linaro MP patches to other kernel branches, and find some regression due to latest kernel change.
The regression is while we test over Linaro 13.06 release with MP3 scenario, we find CA7 is always busy, while one core of CA15 is occasionally raise up with the average of 2% cpu usage ratio, another core is kept silence most of time.
But when switch to our backported branch, we find both core in CA15 becomes active, and keep the usage ratio around 2%.
With further checking, I find one recent merged patch in mainline cause this: https://lkml.org/lkml/2013/6/27/152
This patch mainly change the initial load for the new born task to the largest one, so that it cause hmp make the decision to move all such task to the big cluster. Since cpu3(The first cpu of CA15) is getting busy now, cpu4 is raise up to share the load as consequence. And it make ALL 5 cpus are used in the MP3 scenario, which should make power result looks bad than before...
What is your opinion for this regression, especially for how HMP should act with the increased load raising up with the merged patch?
Actually, I have one patch which would forbid the new born task to the faster cluster. Not sure it would cause any other side affect. Comments welcomes. :)
--- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -840,10 +840,26 @@ void init_task_runnable_average(struct task_struct *p) p->se.avg.runnable_avg_period = slice; __update_task_entity_contrib(&p->se); } + +static inline bool task_is_new_born(struct task_struct *p) +{ + u32 slice; + + /* tribble the times for the new born task */ + slice = sched_slice(task_cfs_rq(p), &p->se) >> 8; + + return p->se.avg.runnable_avg_period < slice; +} + #else void init_task_runnable_average(struct task_struct *p) { } + +static inline bool task_is_new_born(struct task_struct *p) +{ + return true; +} #endif
/* @@ -6331,7 +6347,7 @@ static unsigned int hmp_up_migration(int cpu, struct sched_entity *se) < hmp_next_up_threshold) return 0;
- if (se->avg.load_avg_ratio > hmp_up_threshold) { + if (!task_is_new_born(p) && se->avg.load_avg_ratio > hmp_up_threshold) { /* Target domain load < ~94% */ if (hmp_domain_min_load(hmp_faster_domain(cpu), NULL) > NICE_0_LOAD-64)
Thanks, Lei