mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
hperf_hmp: code fixes for kernel 4.9
This commit is contained in:
committed by
Mauro (mdrjr) Ribeiro
parent
7c1b2a8b55
commit
c1907fa376
@@ -5989,7 +5989,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
|
||||
if (IS_ENABLED(CONFIG_HPERF_HMP) && sync)
|
||||
new_cpu = prev_cpu;
|
||||
else
|
||||
new_cpu = select_idle_sibling(p, prev_cpu);
|
||||
new_cpu = select_idle_sibling(p, prev_cpu, new_cpu);
|
||||
} else {
|
||||
#ifdef CONFIG_HPERF_HMP
|
||||
new_cpu = hmp_select_task_rq_fair(p);
|
||||
@@ -8180,13 +8180,13 @@ static int is_hmp_imbalance(struct sched_domain *sd)
|
||||
static int hmp_can_migrate_task(struct task_struct *p, struct lb_env *env)
|
||||
{
|
||||
if (!cpumask_test_cpu(env->dst_cpu, tsk_cpus_allowed(p))) {
|
||||
schedstat_inc(p, se.statistics.nr_failed_migrations_affine);
|
||||
schedstat_inc(p->se.statistics.nr_failed_migrations_affine);
|
||||
return 0;
|
||||
}
|
||||
env->flags &= ~LBF_ALL_PINNED;
|
||||
|
||||
if (task_running(env->src_rq, p)) {
|
||||
schedstat_inc(p, se.statistics.nr_failed_migrations_running);
|
||||
schedstat_inc(p->se.statistics.nr_failed_migrations_running);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -8220,7 +8220,7 @@ detach_specified_task(struct task_struct *p, struct lb_env *env)
|
||||
* is called, so we can safely collect move_task()
|
||||
* stats here rather than inside move_task().
|
||||
*/
|
||||
schedstat_inc(env->sd, lb_gained[env->idle]);
|
||||
schedstat_inc(env->sd->lb_gained[env->idle]);
|
||||
return p;
|
||||
exit:
|
||||
p->se.migrate_candidate = 0;
|
||||
@@ -8270,14 +8270,14 @@ static unsigned migrate_runnable_task(struct task_struct *migrate_task,
|
||||
.idle = CPU_NOT_IDLE,
|
||||
};
|
||||
|
||||
schedstat_inc(sd, alb_count);
|
||||
schedstat_inc(sd->alb_count);
|
||||
p = detach_specified_task(migrate_task, &env);
|
||||
if (p) {
|
||||
migrate_task->se.last_migration = jiffies;
|
||||
schedstat_inc(sd, alb_pushed);
|
||||
schedstat_inc(sd->alb_pushed);
|
||||
ld_moved = migrate_task->se.load.weight;
|
||||
} else
|
||||
schedstat_inc(sd, alb_failed);
|
||||
schedstat_inc(sd->alb_failed);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user