Skip to content

Commit

Permalink
sched/topology: Remove unused numa_distance in cpu_attach_domain()
Browse files Browse the repository at this point in the history
numa_distance in cpu_attach_domain() is introduced in
commit b5b2173 ("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 585b6d2 ("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 <yangyicong@hisilicon.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Barry Song <baohua@kernel.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lore.kernel.org/r/20210915063158.80639-1-yangyicong@hisilicon.com
  • Loading branch information
Yicong Yang authored and Peter Zijlstra committed Oct 14, 2021
1 parent 7d380f2 commit f9ec6fe
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions kernel/sched/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; ) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f9ec6fe

Please sign in to comment.