diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-09-05 08:32:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-09-05 08:32:49 -0400 |
commit | 7c92e54f6f9601cfa9d8894ee248abcf62ed9a1c (patch) | |
tree | 5678cf7f582ca8e8568ba610dac77161a6a49881 | |
parent | cf2ab4696ee42f895eed88c2b6e432fe03dda0db (diff) |
sched: simplify __check_preempt_curr_fair()
Preparatory patch for fix-ideal-runtime:
simplify __check_preempt_curr_fair(): get rid of the integer return.
text data bss dec hex filename
13404 228 1204 14836 39f4 sched.o.before
13393 228 1204 14825 39e9 sched.o.after
functionality is unchanged.
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 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index bac2aff8273c..f0dd4be1a3a4 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -673,7 +673,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep) | |||
673 | /* | 673 | /* |
674 | * Preempt the current task with a newly woken task if needed: | 674 | * Preempt the current task with a newly woken task if needed: |
675 | */ | 675 | */ |
676 | static int | 676 | static void |
677 | __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se, | 677 | __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se, |
678 | struct sched_entity *curr, unsigned long granularity) | 678 | struct sched_entity *curr, unsigned long granularity) |
679 | { | 679 | { |
@@ -686,9 +686,8 @@ __check_preempt_curr_fair(struct cfs_rq *cfs_rq, struct sched_entity *se, | |||
686 | */ | 686 | */ |
687 | if (__delta > niced_granularity(curr, granularity)) { | 687 | if (__delta > niced_granularity(curr, granularity)) { |
688 | resched_task(rq_of(cfs_rq)->curr); | 688 | resched_task(rq_of(cfs_rq)->curr); |
689 | return 1; | 689 | curr->prev_sum_exec_runtime = curr->sum_exec_runtime; |
690 | } | 690 | } |
691 | return 0; | ||
692 | } | 691 | } |
693 | 692 | ||
694 | static inline void | 693 | static inline void |
@@ -764,8 +763,7 @@ static void entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) | |||
764 | if (delta_exec > ideal_runtime) | 763 | if (delta_exec > ideal_runtime) |
765 | gran = 0; | 764 | gran = 0; |
766 | 765 | ||
767 | if (__check_preempt_curr_fair(cfs_rq, next, curr, gran)) | 766 | __check_preempt_curr_fair(cfs_rq, next, curr, gran); |
768 | curr->prev_sum_exec_runtime = curr->sum_exec_runtime; | ||
769 | } | 767 | } |
770 | 768 | ||
771 | /************************************************** | 769 | /************************************************** |