diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:05 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:05 -0400 |
commit | 5c6b5964a0629bd39fbf4e5648a8aca32de5bcaf (patch) | |
tree | 1b23300ecea76fb8a4bf9dd3942a1a0e5ceeda00 /kernel/sched_fair.c | |
parent | 6d0f0ebd063e36cd0ebae9be15973b02c4245a99 (diff) |
sched: simplify check_preempt() methods
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>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 3179d1129a80..45c7493d8ca8 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -582,8 +582,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep) | |||
582 | * Preempt the current task with a newly woken task if needed: | 582 | * Preempt the current task with a newly woken task if needed: |
583 | */ | 583 | */ |
584 | static void | 584 | static void |
585 | __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se, | 585 | __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *curr) |
586 | struct sched_entity *curr) | ||
587 | { | 586 | { |
588 | unsigned long ideal_runtime, delta_exec; | 587 | unsigned long ideal_runtime, delta_exec; |
589 | 588 | ||
@@ -663,7 +662,7 @@ static void entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) | |||
663 | if (next == curr) | 662 | if (next == curr) |
664 | return; | 663 | return; |
665 | 664 | ||
666 | __check_preempt_curr_fair(cfs_rq, next, curr); | 665 | __check_preempt_curr_fair(cfs_rq, curr); |
667 | } | 666 | } |
668 | 667 | ||
669 | /************************************************** | 668 | /************************************************** |
@@ -866,7 +865,7 @@ static void check_preempt_curr_fair(struct rq *rq, struct task_struct *p) | |||
866 | } | 865 | } |
867 | 866 | ||
868 | if (is_same_group(curr, p)) | 867 | if (is_same_group(curr, p)) |
869 | __check_preempt_curr_fair(cfs_rq, &p->se, &curr->se); | 868 | __check_preempt_curr_fair(cfs_rq, &curr->se); |
870 | } | 869 | } |
871 | 870 | ||
872 | static struct task_struct *pick_next_task_fair(struct rq *rq) | 871 | static struct task_struct *pick_next_task_fair(struct rq *rq) |