[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-bbc8cb5baead9607309583b20873ab0cc8d89eaf@git.kernel.org>
Date: Sat, 17 Jul 2010 11:12:19 GMT
From: tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, suresh.b.siddha@...el.com,
tglx@...utronix.de, venki@...gle.com, mingo@...e.hu
Subject: [tip:sched/core] sched: Reduce update_group_power() calls
Commit-ID: bbc8cb5baead9607309583b20873ab0cc8d89eaf
Gitweb: http://git.kernel.org/tip/bbc8cb5baead9607309583b20873ab0cc8d89eaf
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
AuthorDate: Fri, 9 Jul 2010 15:15:43 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Sat, 17 Jul 2010 12:05:14 +0200
sched: Reduce update_group_power() calls
Currently we update cpu_power() too often, update_group_power() only
updates the local group's cpu_power but it gets called for all groups.
Furthermore, CPU_NEWLY_IDLE invocations will result in all cpus
calling it, even though a slow update of cpu_power is sufficient.
Therefore move the update under 'idle != CPU_NEWLY_IDLE &&
local_group' to reduce superfluous invocations.
Reported-by: Venkatesh Pallipadi <venki@...gle.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Acked-by: Suresh Siddha <suresh.b.siddha@...el.com>
LKML-Reference: <1278612989.1900.176.camel@...top>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/sched_fair.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index e44a591..c9ac097 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -2425,14 +2425,14 @@ static inline void update_sg_lb_stats(struct sched_domain *sd,
* domains. In the newly idle case, we will allow all the cpu's
* to do the newly idle load balance.
*/
- if (idle != CPU_NEWLY_IDLE && local_group &&
- balance_cpu != this_cpu) {
- *balance = 0;
- return;
+ if (idle != CPU_NEWLY_IDLE && local_group) {
+ if (balance_cpu != this_cpu) {
+ *balance = 0;
+ return;
+ }
+ update_group_power(sd, this_cpu);
}
- update_group_power(sd, this_cpu);
-
/* Adjust by relative CPU power of the group */
sgs->avg_load = (sgs->group_load * SCHED_LOAD_SCALE) / group->cpu_power;
--
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