On Wed, Feb 15, 2017 at 02:07:05PM -0500, Thara Gopinath wrote:
[...]
@@ -7664,7 +7699,7 @@ group_type group_classify(struct sched_group *group, static inline void update_sg_lb_stats(struct lb_env *env, struct sched_group *group, int load_idx, int local_group, struct sg_lb_stats *sgs,
bool *overload, bool *overutilized)
bool *overload, bool *overutilized, bool *misfit_task)
{ unsigned long load; int i, nr_running; @@ -7699,8 +7734,16 @@ static inline void update_sg_lb_stats(struct lb_env *env, if (!nr_running && idle_cpu(i)) sgs->idle_cpus++;
if (cpu_overutilized(i))
if (cpu_overutilized(i)) { *overutilized = true;
/*
* If the cpu is overutilized and if there is only one
* current task in cfs runqueue, it is potentially a misfit
* task.
*/
if (rq->cfs.h_nr_running == 1)
*misfit_task = true;
Can we also check rq->misfit? E.g. if one big task is enqueued onto rq, the rq->misfit is set but the CPU utilization will take long time to cross 'overutilized', so if check rq->misfit we can quickly get to know there have misfit task on it.
Hi Leo,
I am reworking the patch to post a V2. I am using 4.9 rc-6 kernel and there is not pointer called "misfit" in rq. Which kernel version are you on?
Usually I work on kernel v4.4, the Android common kernel is: https://android.googlesource.com/kernel/common/+/android-4.4
I can verify the patch for kernel v4.4 on Juno with ARM LT's branch: https://git.linaro.org/landing-teams/working/arm/kernel-release.git/log/?h=l...
Basically they are the same code base for EAS development.
Thanks, Leo Yan