diff --git a/include/linux/sched.h b/include/linux/sched.h index c35dbd51cbcf..f9b69056809d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -900,7 +900,6 @@ struct task_struct { unsigned sched_reset_on_fork:1; unsigned sched_contributes_to_load:1; unsigned sched_migrated:1; - unsigned sched_task_hot:1; /* Force alignment to the next boundary: */ unsigned :0; diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index eff3030debbc..e17d0efd09a7 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8425,8 +8425,6 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) int can_migrate = 1; lockdep_assert_rq_held(env->src_rq); - if (p->sched_task_hot) - p->sched_task_hot = 0; trace_android_rvh_can_migrate_task(p, env->dst_cpu, &can_migrate); if (!can_migrate) @@ -8503,8 +8501,10 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) if (tsk_cache_hot <= 0 || env->sd->nr_balance_failed > env->sd->cache_nice_tries) { - if (tsk_cache_hot == 1) - p->sched_task_hot = 1; + if (tsk_cache_hot == 1) { + schedstat_inc(env->sd->lb_hot_gained[env->idle]); + schedstat_inc(p->stats.nr_forced_migrations); + } return 1; } @@ -8531,12 +8531,6 @@ static void detach_task(struct task_struct *p, struct lb_env *env) if (detached) return; - if (p->sched_task_hot) { - p->sched_task_hot = 0; - schedstat_inc(env->sd->lb_hot_gained[env->idle]); - schedstat_inc(p->stats.nr_forced_migrations); - } - deactivate_task(env->src_rq, p, DEQUEUE_NOCLOCK); set_task_cpu(p, env->dst_cpu); } @@ -8697,9 +8691,6 @@ static int detach_tasks(struct lb_env *env) continue; next: - if (p->sched_task_hot) - schedstat_inc(p->stats.nr_failed_migrations_hot); - list_move(&p->se.group_node, tasks); }