mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-10 08:33:14 +00:00
sched: fix wakeup preemption clock
Impact: sharpen the wakeup-granularity to always be against current scheduler time It was possible to do the preemption check against an old time stamp. Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
d65bd5ecb2
commit
03e89e4574
2 changed files with 4 additions and 5 deletions
|
@ -2266,6 +2266,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
|
|||
|
||||
smp_wmb();
|
||||
rq = task_rq_lock(p, &flags);
|
||||
update_rq_clock(rq);
|
||||
old_state = p->state;
|
||||
if (!(old_state & state))
|
||||
goto out;
|
||||
|
@ -2323,7 +2324,6 @@ out_activate:
|
|||
schedstat_inc(p, se.nr_wakeups_local);
|
||||
else
|
||||
schedstat_inc(p, se.nr_wakeups_remote);
|
||||
update_rq_clock(rq);
|
||||
activate_task(rq, p, 1);
|
||||
success = 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue