From: Nick Piggin Signed-off-by: Andrew Morton --- 25-akpm/kernel/sched.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff -puN kernel/sched.c~sched-smtnice-fix kernel/sched.c --- 25/kernel/sched.c~sched-smtnice-fix Thu Sep 9 15:40:09 2004 +++ 25-akpm/kernel/sched.c Thu Sep 9 15:40:09 2004 @@ -2257,9 +2257,7 @@ static inline int dependent_sleeper(int * task from using an unfair proportion of the * physical cpu's resources. -ck */ - if (((task_timeslice(smt_curr, smt_rq) - * (100 - sd->per_cpu_gain) / 100) > - task_timeslice(p, this_rq) || rt_task(smt_curr)) && + if ((smt_curr->static_prio + 5 < p->static_prio) && p->mm && smt_curr->mm && !rt_task(p)) ret = 1; @@ -2268,11 +2266,10 @@ static inline int dependent_sleeper(int * or wake it up if it has been put to sleep for priority * reasons. */ - if ((((task_timeslice(p, this_rq) * (100-sd->per_cpu_gain)/100) - > task_timeslice(smt_curr, smt_rq) || rt_task(p)) && + if ((p->static_prio + 5 < smt_curr->static_prio && smt_curr->mm && p->mm && !rt_task(smt_curr)) || (smt_curr == smt_rq->idle && smt_rq->nr_running)) - resched_task(smt_curr); + resched_task(smt_curr); } out_unlock: for_each_cpu_mask(i, sibling_map) _