sched/topology: Remove unused numa_distance in cpu_attach_domain()
PATCH 1/1 sched/topology: Remove unused numa_distance in cpu_attach_domain()
numa_distance in cpu_attach_domain() is introduced in commit b5b217346de8 ("sched/topology: Warn when NUMA diameter > 2") to warn user when NUMA diameter > 2 as we'll misrepresent the scheduler topology structures at that time. This is fixed by Barry in commit 585b6d2723dc ("sched/topology: fix the issue groups don't span domain->span for NUMA diameter > 2") and numa_distance is unused now. So remove it.
--- kernel/sched/topology.c | 4 ---- 1 file changed, 4 deletions(-)
kernel/sched/topology.c +0 -4
@@ -688,7 +688,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) {struct rq *rq =cpu_rq (cpu);struct sched_domain *tmp; -int numa_distance =0 ;/* Remove the sched domains which do not contribute to scheduling. */ for (tmp = sd; tmp; ) {
@@ -720,9 +719,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) sd->child =NULL ; } -for (tmp = sd; tmp; tmp = tmp->parent) - numa_distance += !!(tmp->flags &SD_NUMA ); -sched_domain_debug (sd, cpu);rq_attach_root (rq, rd);
Signature · 1 line
2.17.1
Quoted 10 lines · Yicong Yang
numa_distanceincpu_attach_domain()is introduced in commitb5b217346de8("sched/topology: Warn when NUMA diameter > 2") to warn user when NUMA diameter > 2 as we'll misrepresent the scheduler topology structures at that time. This is fixed by Barry in commit585b6d2723dc("sched/topology: fix the issue groups don't spandomain->spanfor NUMA diameter > 2") andnuma_distanceis unused now. So remove it.Signed-off-by Yicong Yang <[email protected]>
looks good to me.
Quoted 27 lines
--- kernel/sched/topology.c | 4 ---- 1 file changed, 4 deletions(-)kernel/sched/topology.c +0
-5@@ -688,7 +688,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) {struct rq *rq =cpu_rq (cpu);struct sched_domain *tmp; -int numa_distance =0 ;/* Remove the sched domains which do not contribute to scheduling. */ for (tmp = sd; tmp; ) {@@ -720,9 +719,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) sd->child =NULL ; } -for (tmp = sd; tmp; tmp = tmp->parent) - numa_distance += !!(tmp->flags &SD_NUMA ); -sched_domain_debug (sd, cpu);rq_attach_root (rq, rd); --
Quoted 2 lines
2.17.1
Thanks
Barry