diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-10-15 11:00:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:14 -0400 |
commit | 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 (patch) | |
tree | 48e2204da284c2136fe40f89eca0c212fb976807 | |
parent | a58f6f253d268f7b9712bd13c344a1fd89a3192f (diff) |
sched: another wakeup_granularity fix
unit mis-match: wakeup_gran was used against a vruntime
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/sched_fair.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index f5f491762e35..3ecbfd0902d8 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -818,7 +818,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) | |||
818 | struct task_struct *curr = rq->curr; | 818 | struct task_struct *curr = rq->curr; |
819 | struct cfs_rq *cfs_rq = task_cfs_rq(curr); | 819 | struct cfs_rq *cfs_rq = task_cfs_rq(curr); |
820 | struct sched_entity *se = &curr->se, *pse = &p->se; | 820 | struct sched_entity *se = &curr->se, *pse = &p->se; |
821 | s64 delta; | 821 | s64 delta, gran; |
822 | 822 | ||
823 | if (unlikely(rt_prio(p->prio))) { | 823 | if (unlikely(rt_prio(p->prio))) { |
824 | update_rq_clock(rq); | 824 | update_rq_clock(rq); |
@@ -833,8 +833,11 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) | |||
833 | } | 833 | } |
834 | 834 | ||
835 | delta = se->vruntime - pse->vruntime; | 835 | delta = se->vruntime - pse->vruntime; |
836 | gran = sysctl_sched_wakeup_granularity; | ||
837 | if (unlikely(se->load.weight != NICE_0_LOAD)) | ||
838 | gran = calc_delta_fair(gran, &se->load); | ||
836 | 839 | ||
837 | if (delta > (s64)sysctl_sched_wakeup_granularity) | 840 | if (delta > gran) |
838 | resched_task(curr); | 841 | resched_task(curr); |
839 | } | 842 | } |
840 | 843 | ||