提交 980d06cf 编写于 作者: D Dietmar Eggemann 提交者: Yihao Wu

sched/fair: Remove sgs->sum_weighted_load

to #28739709

commit af75d1a9a9f75bf030c2f35705f1ff6d226f96fe upstream

Since sg_lb_stats::sum_weighted_load is now identical with
sg_lb_stats::group_load remove it and replace its use case
(calculating load per task) with the latter.
Signed-off-by: NDietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: NRik van Riel <riel@surriel.com>
Acked-by: NVincent Guittot <vincent.guittot@linaro.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Morten Rasmussen <morten.rasmussen@arm.com>
Cc: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Perret <quentin.perret@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lkml.kernel.org/r/20190527062116.11512-7-dietmar.eggemann@arm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
Signed-off-by: NYihao Wu <wuyihao@linux.alibaba.com>
Reviewed-by: NShanpei Chen <shanpeic@linux.alibaba.com>
Signed-off-by: NYihao Wu <wuyihao@linux.alibaba.com>
上级 b21904d4
...@@ -7405,7 +7405,6 @@ enum group_type { ...@@ -7405,7 +7405,6 @@ enum group_type {
struct sg_lb_stats { struct sg_lb_stats {
unsigned long avg_load; /*Avg load across the CPUs of the group */ unsigned long avg_load; /*Avg load across the CPUs of the group */
unsigned long group_load; /* Total load over the CPUs of the group */ unsigned long group_load; /* Total load over the CPUs of the group */
unsigned long sum_weighted_load; /* Weighted load of group's tasks */
unsigned long load_per_task; unsigned long load_per_task;
unsigned long group_capacity; unsigned long group_capacity;
unsigned long group_util; /* Total utilization of the group */ unsigned long group_util; /* Total utilization of the group */
...@@ -7738,7 +7737,6 @@ static inline void update_sg_lb_stats(struct lb_env *env, ...@@ -7738,7 +7737,6 @@ static inline void update_sg_lb_stats(struct lb_env *env,
sgs->nr_numa_running += rq->nr_numa_running; sgs->nr_numa_running += rq->nr_numa_running;
sgs->nr_preferred_running += rq->nr_preferred_running; sgs->nr_preferred_running += rq->nr_preferred_running;
#endif #endif
sgs->sum_weighted_load += weighted_cpuload(rq);
/* /*
* No need to call idle_cpu() if nr_running is not 0 * No need to call idle_cpu() if nr_running is not 0
*/ */
...@@ -7751,7 +7749,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, ...@@ -7751,7 +7749,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
sgs->avg_load = (sgs->group_load*SCHED_CAPACITY_SCALE) / sgs->group_capacity; sgs->avg_load = (sgs->group_load*SCHED_CAPACITY_SCALE) / sgs->group_capacity;
if (sgs->sum_nr_running) if (sgs->sum_nr_running)
sgs->load_per_task = sgs->sum_weighted_load / sgs->sum_nr_running; sgs->load_per_task = sgs->group_load / sgs->sum_nr_running;
sgs->group_weight = group->group_weight; sgs->group_weight = group->group_weight;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册