aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-08-09 05:16:47 -0400
committerIngo Molnar <mingo@elte.hu>2007-08-09 05:16:47 -0400
commita8e504d2a57ecd3f905b402072cdd1903f963bef (patch)
tree1957f0cb0f8b6187f8c299f2be1352a8d35fe5bd /kernel/sched_fair.c
parentb04a0f4c1651a553ee1a03dc70297d66ec74db5c (diff)
sched: eliminate rq_clock() use
eliminate rq_clock() use by changing it to: update_rq_clock(rq) now = rq->clock; identity transformation - no change in behavior. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 923bed0b0c42..969f08c8bd34 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -844,7 +844,8 @@ static void check_preempt_curr_fair(struct rq *rq, struct task_struct *p)
844 unsigned long gran; 844 unsigned long gran;
845 845
846 if (unlikely(rt_prio(p->prio))) { 846 if (unlikely(rt_prio(p->prio))) {
847 update_curr(cfs_rq, rq_clock(rq)); 847 update_rq_clock(rq);
848 update_curr(cfs_rq, rq->clock);
848 resched_task(curr); 849 resched_task(curr);
849 return; 850 return;
850 } 851 }
@@ -1063,9 +1064,12 @@ static void set_curr_task_fair(struct rq *rq)
1063{ 1064{
1064 struct task_struct *curr = rq->curr; 1065 struct task_struct *curr = rq->curr;
1065 struct sched_entity *se = &curr->se; 1066 struct sched_entity *se = &curr->se;
1066 u64 now = rq_clock(rq); 1067 u64 now;
1067 struct cfs_rq *cfs_rq; 1068 struct cfs_rq *cfs_rq;
1068 1069
1070 update_rq_clock(rq);
1071 now = rq->clock;
1072
1069 for_each_sched_entity(se) { 1073 for_each_sched_entity(se) {
1070 cfs_rq = cfs_rq_of(se); 1074 cfs_rq = cfs_rq_of(se);
1071 set_next_entity(cfs_rq, se, now); 1075 set_next_entity(cfs_rq, se, now);