mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 00:46:47 +07:00
sched/core: Fix double update_rq_clock) calls in attach_task()/detach_task()
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
7a57f32a4d
commit
5704ac0ae7
@ -6771,7 +6771,7 @@ static void detach_task(struct task_struct *p, struct lb_env *env)
|
||||
lockdep_assert_held(&env->src_rq->lock);
|
||||
|
||||
p->on_rq = TASK_ON_RQ_MIGRATING;
|
||||
deactivate_task(env->src_rq, p, 0);
|
||||
deactivate_task(env->src_rq, p, DEQUEUE_NOCLOCK);
|
||||
set_task_cpu(p, env->dst_cpu);
|
||||
}
|
||||
|
||||
@ -6904,7 +6904,7 @@ static void attach_task(struct rq *rq, struct task_struct *p)
|
||||
lockdep_assert_held(&rq->lock);
|
||||
|
||||
BUG_ON(task_rq(p) != rq);
|
||||
activate_task(rq, p, 0);
|
||||
activate_task(rq, p, ENQUEUE_NOCLOCK);
|
||||
p->on_rq = TASK_ON_RQ_QUEUED;
|
||||
check_preempt_curr(rq, p, 0);
|
||||
}
|
||||
@ -6918,6 +6918,7 @@ static void attach_one_task(struct rq *rq, struct task_struct *p)
|
||||
struct rq_flags rf;
|
||||
|
||||
rq_lock(rq, &rf);
|
||||
update_rq_clock(rq);
|
||||
attach_task(rq, p);
|
||||
rq_unlock(rq, &rf);
|
||||
}
|
||||
@ -6933,6 +6934,7 @@ static void attach_tasks(struct lb_env *env)
|
||||
struct rq_flags rf;
|
||||
|
||||
rq_lock(env->dst_rq, &rf);
|
||||
update_rq_clock(env->dst_rq);
|
||||
|
||||
while (!list_empty(tasks)) {
|
||||
p = list_first_entry(tasks, struct task_struct, se.group_node);
|
||||
|
Loading…
Reference in New Issue
Block a user