summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorMike Galbraith <efault@gmx.de>2008-12-16 08:45:30 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-16 09:45:38 +0100
commit03e89e4574a680af15f59329b061f35d9813aff4 (patch)
tree2cf03e33021fbf8cf2aaf6ce99314eb45ed34dbc /kernel/sched.c
parentd65bd5ecb2bd166cea4952a59b7e16cc3ad6ef6c (diff)
downloadtalos-op-linux-03e89e4574a680af15f59329b061f35d9813aff4.tar.gz
talos-op-linux-03e89e4574a680af15f59329b061f35d9813aff4.zip
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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index ad7b93be5691..88215066efae 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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;
OpenPOWER on IntegriCloud