[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9d9b39fc-82db-4320-9935-f760ee723064@amperemail.onmicrosoft.com>
Date: Mon, 22 Jan 2024 16:27:58 +0800
From: Shijie Huang <shijie@...eremail.onmicrosoft.com>
To: Mike Rapoport <rppt@...nel.org>
Cc: Yury Norov <yury.norov@...il.com>,
Huang Shijie <shijie@...amperecomputing.com>, gregkh@...uxfoundation.org,
patches@...erecomputing.com, rafael@...nel.org, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu, kuba@...nel.org,
vschneid@...hat.com, mingo@...nel.org, akpm@...ux-foundation.org,
vbabka@...e.cz, tglx@...utronix.de, jpoimboe@...nel.org,
ndesaulniers@...gle.com, mikelley@...rosoft.com, mhiramat@...nel.org,
arnd@...db.de, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
catalin.marinas@....com, will@...nel.org, mark.rutland@....com,
mpe@...erman.id.au, linuxppc-dev@...ts.ozlabs.org, chenhuacai@...nel.org,
jiaxun.yang@...goat.com, linux-mips@...r.kernel.org,
cl@...amperecomputing.com
Subject: Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the
correct node id
在 2024/1/22 15:41, Mike Rapoport 写道:
> On Fri, Jan 19, 2024 at 04:50:53PM +0800, Shijie Huang wrote:
>> 在 2024/1/19 16:42, Mike Rapoport 写道:
>>> Is there a fundamental reason to have early_cpu_to_node() at all?
>> The early_cpu_to_node does not work on some ARCHs (which support the NUMA),
>> such as SPARC, MIPS and S390.
> My question was why we need early_cpu_to_node() at all and why can't we use
> cpu_to_node() early on arches that do have it
As you see, some ARCHs use cpu_to_node() all the time, such as
SPARC,mips and S390.
They do not use early_cpu_to_node() at all.
In some ARCHs(arm64, powerpc riscv), the cpu_to_node() is ready at:
start_kernel --> arch_call_rest_init() --> rest_init()
--> kernel_init() --> kernel_init_freeable()
--> smp_prepare_cpus()
The cpu_to_node() is initialized too late.
I am not sure if we can move "cpu_to_node initialization" to an early place.
Move "cpu_to_node() initization" to an early place is more complicated,
I guess.
Thanks
Huang Shijie
Powered by blists - more mailing lists