@@ -9857,7 +9857,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
9857
9857
bool * sg_overloaded ,
9858
9858
bool * sg_overutilized )
9859
9859
{
9860
- int i , nr_running , local_group ;
9860
+ int i , nr_running , local_group , sd_flags = env -> sd -> flags ;
9861
9861
9862
9862
memset (sgs , 0 , sizeof (* sgs ));
9863
9863
@@ -9881,10 +9881,6 @@ static inline void update_sg_lb_stats(struct lb_env *env,
9881
9881
if (cpu_overutilized (i ))
9882
9882
* sg_overutilized = 1 ;
9883
9883
9884
- #ifdef CONFIG_NUMA_BALANCING
9885
- sgs -> nr_numa_running += rq -> nr_numa_running ;
9886
- sgs -> nr_preferred_running += rq -> nr_preferred_running ;
9887
- #endif
9888
9884
/*
9889
9885
* No need to call idle_cpu() if nr_running is not 0
9890
9886
*/
@@ -9894,10 +9890,17 @@ static inline void update_sg_lb_stats(struct lb_env *env,
9894
9890
continue ;
9895
9891
}
9896
9892
9893
+ #ifdef CONFIG_NUMA_BALANCING
9894
+ /* Only fbq_classify_group() uses this to classify NUMA groups */
9895
+ if (sd_flags & SD_NUMA ) {
9896
+ sgs -> nr_numa_running += rq -> nr_numa_running ;
9897
+ sgs -> nr_preferred_running += rq -> nr_preferred_running ;
9898
+ }
9899
+ #endif
9897
9900
if (local_group )
9898
9901
continue ;
9899
9902
9900
- if (env -> sd -> flags & SD_ASYM_CPUCAPACITY ) {
9903
+ if (sd_flags & SD_ASYM_CPUCAPACITY ) {
9901
9904
/* Check for a misfit task on the cpu */
9902
9905
if (sgs -> group_misfit_task_load < rq -> misfit_task_load ) {
9903
9906
sgs -> group_misfit_task_load = rq -> misfit_task_load ;
0 commit comments