Re: [PATCH 1/1] Fix undefined reference to 'node_reclaim_distance'.

From: Gonsolo
Date: Mon Dec 16 2019 - 08:51:04 EST


> The offending commit seems to be a55c7454a8c887b2 ("sched/topology:
> Improve load balancing on AMD EPYC systems").
>
> Probably the node_reclaim_distance variable should be moved from
> an SMP-specific file to a NUMA-specific file.

There are two variables that are used elsewhere:

int sched_max_numa_distance;

Used in kernel/sched/fair.c and kernel/sched/topology.c. I would move
it to fair.c.

int __read_mostly node_reclaim_distance = RECLAIM_DISTANCE;

Used in
arch/x86/kernel/cpu/amd.c, line 894
kernel/sched/topology.c
mm/khugepaged.c, line 725
mm/page_alloc.c, line 3529

I'm not sure where to move this one.

--
g