mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Revert "sched/fair: Fix value reported by hot tasks pulled in /proc/schedstat"
This reverts commit a18682ccd2 which is
commit a430d99e349026d53e2557b7b22bd2ebd61fe12a upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Ia71eb1867950bae93b6c426a596d584716137b29
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -900,7 +900,6 @@ struct task_struct {
|
|||||||
unsigned sched_reset_on_fork:1;
|
unsigned sched_reset_on_fork:1;
|
||||||
unsigned sched_contributes_to_load:1;
|
unsigned sched_contributes_to_load:1;
|
||||||
unsigned sched_migrated:1;
|
unsigned sched_migrated:1;
|
||||||
unsigned sched_task_hot:1;
|
|
||||||
|
|
||||||
/* Force alignment to the next boundary: */
|
/* Force alignment to the next boundary: */
|
||||||
unsigned :0;
|
unsigned :0;
|
||||||
|
|||||||
@@ -8425,8 +8425,6 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
|
|||||||
int can_migrate = 1;
|
int can_migrate = 1;
|
||||||
|
|
||||||
lockdep_assert_rq_held(env->src_rq);
|
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);
|
trace_android_rvh_can_migrate_task(p, env->dst_cpu, &can_migrate);
|
||||||
if (!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 ||
|
if (tsk_cache_hot <= 0 ||
|
||||||
env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
|
env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
|
||||||
if (tsk_cache_hot == 1)
|
if (tsk_cache_hot == 1) {
|
||||||
p->sched_task_hot = 1;
|
schedstat_inc(env->sd->lb_hot_gained[env->idle]);
|
||||||
|
schedstat_inc(p->stats.nr_forced_migrations);
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8531,12 +8531,6 @@ static void detach_task(struct task_struct *p, struct lb_env *env)
|
|||||||
if (detached)
|
if (detached)
|
||||||
return;
|
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);
|
deactivate_task(env->src_rq, p, DEQUEUE_NOCLOCK);
|
||||||
set_task_cpu(p, env->dst_cpu);
|
set_task_cpu(p, env->dst_cpu);
|
||||||
}
|
}
|
||||||
@@ -8697,9 +8691,6 @@ static int detach_tasks(struct lb_env *env)
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
next:
|
next:
|
||||||
if (p->sched_task_hot)
|
|
||||||
schedstat_inc(p->stats.nr_failed_migrations_hot);
|
|
||||||
|
|
||||||
list_move(&p->se.group_node, tasks);
|
list_move(&p->se.group_node, tasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user