From: Yicong Yang Date: Wed, 15 Sep 2021 06:31:58 +0000 (+0800) Subject: sched/topology: Remove unused numa_distance in cpu_attach_domain() X-Git-Tag: v6.6.17~8991^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9ec6fea201429b5a3f76319e943989f1a1e25ef;p=platform%2Fkernel%2Flinux-rpi.git 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. Signed-off-by: Yicong Yang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Barry Song Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20210915063158.80639-1-yangyicong@hisilicon.com --- diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index c56faae..5af3edd 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -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; ) { @@ -732,9 +731,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) } } - for (tmp = sd; tmp; tmp = tmp->parent) - numa_distance += !!(tmp->flags & SD_NUMA); - sched_domain_debug(sd, cpu); rq_attach_root(rq, rd);