Skip to content

Commit af75d1a

Browse files
deggemanIngo Molnar
authored andcommitted
sched/fair: Remove sgs->sum_weighted_load
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: Dietmar Eggemann <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Rik van Riel <[email protected]> Acked-by: Vincent Guittot <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Morten Rasmussen <[email protected]> Cc: Patrick Bellasi <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Quentin Perret <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Valentin Schneider <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 0e1fef6 commit af75d1a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/sched/fair.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7577,7 +7577,6 @@ static unsigned long task_h_load(struct task_struct *p)
75777577
struct sg_lb_stats {
75787578
unsigned long avg_load; /*Avg load across the CPUs of the group */
75797579
unsigned long group_load; /* Total load over the CPUs of the group */
7580-
unsigned long sum_weighted_load; /* Weighted load of group's tasks */
75817580
unsigned long load_per_task;
75827581
unsigned long group_capacity;
75837582
unsigned long group_util; /* Total utilization of the group */
@@ -7944,7 +7943,6 @@ static inline void update_sg_lb_stats(struct lb_env *env,
79447943
sgs->nr_numa_running += rq->nr_numa_running;
79457944
sgs->nr_preferred_running += rq->nr_preferred_running;
79467945
#endif
7947-
sgs->sum_weighted_load += weighted_cpuload(rq);
79487946
/*
79497947
* No need to call idle_cpu() if nr_running is not 0
79507948
*/
@@ -7963,7 +7961,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
79637961
sgs->avg_load = (sgs->group_load*SCHED_CAPACITY_SCALE) / sgs->group_capacity;
79647962

79657963
if (sgs->sum_nr_running)
7966-
sgs->load_per_task = sgs->sum_weighted_load / sgs->sum_nr_running;
7964+
sgs->load_per_task = sgs->group_load / sgs->sum_nr_running;
79677965

79687966
sgs->group_weight = group->group_weight;
79697967

0 commit comments

Comments
 (0)