sched: simplify check_preempt() methods
authorIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:05 +0000 (17:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:05 +0000 (17:00 +0200)
simplify the check_preempt() methods.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
kernel/sched_fair.c

index 3179d1129a80980d41a1e3ee9dd31f735768be57..45c7493d8ca879e72ec2d23615cfee962615de1e 100644 (file)
@@ -582,8 +582,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep)
  * Preempt the current task with a newly woken task if needed:
  */
 static void
-__check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se,
-                         struct sched_entity *curr)
+__check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *curr)
 {
        unsigned long ideal_runtime, delta_exec;
 
@@ -663,7 +662,7 @@ static void entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
        if (next == curr)
                return;
 
-       __check_preempt_curr_fair(cfs_rq, next, curr);
+       __check_preempt_curr_fair(cfs_rq, curr);
 }
 
 /**************************************************
@@ -866,7 +865,7 @@ static void check_preempt_curr_fair(struct rq *rq, struct task_struct *p)
        }
 
        if (is_same_group(curr, p))
-               __check_preempt_curr_fair(cfs_rq, &p->se, &curr->se);
+               __check_preempt_curr_fair(cfs_rq, &curr->se);
 }
 
 static struct task_struct *pick_next_task_fair(struct rq *rq)