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>
This commit is contained in:
Ingo Molnar
2007-08-09 11:16:47 +02:00
parent b04a0f4c16
commit a8e504d2a5
2 changed files with 40 additions and 17 deletions

View File

@@ -844,7 +844,8 @@ static void check_preempt_curr_fair(struct rq *rq, struct task_struct *p)
unsigned long gran;
if (unlikely(rt_prio(p->prio))) {
update_curr(cfs_rq, rq_clock(rq));
update_rq_clock(rq);
update_curr(cfs_rq, rq->clock);
resched_task(curr);
return;
}
@@ -1063,9 +1064,12 @@ static void set_curr_task_fair(struct rq *rq)
{
struct task_struct *curr = rq->curr;
struct sched_entity *se = &curr->se;
u64 now = rq_clock(rq);
u64 now;
struct cfs_rq *cfs_rq;
update_rq_clock(rq);
now = rq->clock;
for_each_sched_entity(se) {
cfs_rq = cfs_rq_of(se);
set_next_entity(cfs_rq, se, now);