[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1353157457-3649-3-git-send-email-alex.shi@intel.com>
Date: Sat, 17 Nov 2012 21:04:14 +0800
From: Alex Shi <alex.shi@...el.com>
To: mingo@...hat.com, peterz@...radead.org, pjt@...gle.com,
preeti@...ux.vnet.ibm.com, vincent.guittot@...aro.org
Cc: linux-kernel@...r.kernel.org
Subject: [RFC PATCH 2/5] sched: update rq runnable load average in time
Now we have rq runnable load average value, and prepare to use it in rq
cpu_load[] updating.
So we want to make sure rq cup_load[] updating is using the latest
data. The update_cpu_load_active(rq) was put after task_tick() is for
this purpose.
Signed-off-by: Alex Shi <alex.shi@...el.com>
---
kernel/sched/core.c | 2 +-
kernel/sched/fair.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9dbbe45..bacfee0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2657,8 +2657,8 @@ void scheduler_tick(void)
raw_spin_lock(&rq->lock);
update_rq_clock(rq);
- update_cpu_load_active(rq);
curr->sched_class->task_tick(rq, curr, 0);
+ update_cpu_load_active(rq);
raw_spin_unlock(&rq->lock);
perf_event_task_tick();
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index bc60e43..44c07ed 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6011,6 +6011,7 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle)
raw_spin_lock_irq(&rq->lock);
update_rq_clock(rq);
+ update_rq_runnable_avg(rq, rq->nr_running);
update_idle_cpu_load(rq);
raw_spin_unlock_irq(&rq->lock);
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists