[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200827031216.GB14765@casper.infradead.org>
Date: Thu, 27 Aug 2020 04:12:16 +0100
From: Matthew Wilcox <willy@...radead.org>
To: hejinyang <hejinyang@...ngson.cn>
Cc: Huacai Chen <chenhc@...ote.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Tiezhu Yang <yangtiezhu@...ngson.cn>,
Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH] MIPS: Loongson: Fix complie errors without CONFIG_SMP
On Thu, Aug 27, 2020 at 10:31:33AM +0800, hejinyang wrote:
>
>
> On 08/26/2020 09:01 PM, Matthew Wilcox wrote:
> > On Wed, Aug 26, 2020 at 08:53:27PM +0800, Jinyang He wrote:
> > > +++ b/arch/mips/include/asm/mach-loongson64/topology.h
> > > @@ -4,7 +4,11 @@
> > > #ifdef CONFIG_NUMA
> > > +#ifdef CONFIG_SMP
> > > #define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
> > > +#else
> > > +#define cpu_to_node(cpu) 0
> > > +#endif
> > Are you saying you've enabled NUMA without enabling SMP? Does that make
> > sense?
>
> NUMA option normally work with more than two nodes, though Loongson64 use it
> default after patch 6fbde6b492dfc761ad60a68fb2cb32b1eb05b786. Loongson64(3A)'s
> each node consists of 4 cpus while it only has 4 cpus. In other words, it has
> only one node while open NUMA. I'm confused it if NUMA deponds on SMP.
>
> I'll try fix it with unabling NUMA and SMP later.
mips:
config NUMA
bool "NUMA Support"
depends on SYS_SUPPORTS_NUMA
x86:
config NUMA
bool "NUMA Memory Allocation and Scheduler Support"
depends on SMP
If you had a good reason for enabling NUMA without enabling SMP (CPU-less
memory nodes?), that'd be an interesting discussion to have. Since your
hardware seems to have SMP by default, I'd suggest just adding the missing
'depends'.
Powered by blists - more mailing lists