Subject: Re: [PATCH 13/17] mm: move numa_distance and related code from x86 to numa_memblks

From: Mike Rapoport <[email-masked]>
Date: Sat, 20 Jul 2024 15:25:15 +0300

On Fri, Jul 19, 2024 at 06:48:42PM +0100, Jonathan Cameron wrote:
> On Tue, 16 Jul 2024 14:13:42 +0300
> Mike Rapoport <[email-masked]> wrote:
> 
> > From: "Mike Rapoport (Microsoft)" <[email-masked]>
> > 
> > Move code dealing with numa_distance array from arch/x86 to
> > mm/numa_memblks.c
> 
> It's not really numa memblock related. Is this the best place
> to put it?

There is a dependency of numa_alloc_distance() on
numa_nodemask_from_meminfo() that relies on numa_memblk but I agree that
they are not really related.

However, I'd prefer to keep this code in mm/numa_memblks.c because
node_distance() definitions and related code are different between
architecures and having this code outside numa_memblks in e.g
mm/numa.c would be way more involved.
 
> > This code will be later reused by arch_numa.
> > 
> > No functional changes.
> > 
> > Signed-off-by: Mike Rapoport (Microsoft) <[email-masked]>
> 

-- 
Sincerely yours,
Mike.