[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f45f983d-8ff1-a800-2706-d71413ae1824@infradead.org>
Date: Tue, 19 Nov 2019 13:12:52 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
Linux-sh list <linux-sh@...r.kernel.org>
Subject: Re: [PATCH] arch/sh/: fix NUMA build errors
On 11/18/19 11:38 PM, Geert Uytterhoeven wrote:
> Hi Randy,
>
> On Tue, Nov 19, 2019 at 1:55 AM Randy Dunlap <rdunlap@...radead.org> wrote:
>> From: Randy Dunlap <rdunlap@...radead.org>
>> Fix SUPERH builds that select SYS_SUPPORTS_NUMA but do not select
>> SYS_SUPPORTS_SMP and SMP.
>>
>> kernel/sched/topology.c is only built for CONFIG_SMP and then the NUMA
>> code + data inside topology.c is only built when CONFIG_NUMA is
>> set/enabled, so these arch/sh/ configs need to select SMP and
>> SYS_SUPPORTS_SMP to build the NUMA support.
>>
>> Fixes this build error in 3 different SUPERH configs:
>>
>> mm/page_alloc.o: In function `get_page_from_freelist':
>> page_alloc.c:(.text+0x2ca8): undefined reference to `node_reclaim_distance'
>>
>> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
>> Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
>> Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
>> Cc: Rich Felker <dalias@...c.org>
>> Cc: linux-sh@...r.kernel.org
>> ---
>> or maybe these should be fixed in the defconfig files?
>>
>> or alternatively, does it make any sense to support NUMA without SMP?
>
> I think it does. From arch/sh/mm/Kconfig config NUMA help:
>
> Some SH systems have many various memories scattered around
> the address space, each with varying latencies. This enables
> support for these blocks by binding them to nodes and allowing
> memory policies to be used for prioritizing and controlling
> allocation behaviour.
Yes, I saw that and suspected it also.
I was (and still am) hoping that a SuperH maintainer comments on
this and on how they are currently building kernels for these
failing configs. Maybe they have some patches that aren't in-tree yet?
> Probably the NUMA-core is too server/x86-centric, by assuming NUMA is
> used only on systems with multiple CPUs, each with their own RAM.
>
> AFAIK, none of the SoCs below are SMP:
>
>> --- lnx-54-rc8.orig/arch/sh/Kconfig
>> +++ lnx-54-rc8/arch/sh/Kconfig
>> @@ -508,6 +508,8 @@ config CPU_SUBTYPE_SH7722
>> select CPU_SHX2
>> select ARCH_SHMOBILE
>> select ARCH_SPARSEMEM_ENABLE
>> + select SYS_SUPPORTS_SMP
>> + select SMP
>> select SYS_SUPPORTS_NUMA
>> select SYS_SUPPORTS_SH_CMT
>> select PINCTRL
>> @@ -518,6 +520,8 @@ config CPU_SUBTYPE_SH7366
>> select CPU_SHX2
>> select ARCH_SHMOBILE
>> select ARCH_SPARSEMEM_ENABLE
>> + select SYS_SUPPORTS_SMP
>> + select SMP
>> select SYS_SUPPORTS_NUMA
>> select SYS_SUPPORTS_SH_CMT
>
> BTW, you didn't have the issue with CPU_SHX3 and CPU_SUBTYPE_SH7785?
I didn't see any issue there but I will check it again.
thanks.
--
~Randy
Powered by blists - more mailing lists