Re: [PATCH] init: refactor the generic cpu_to_node for NUMA

2024-01-18 Thread Shijie Huang
Hi Greg, 在 2024/1/18 17:27, Greg KH 写道: On Thu, Jan 18, 2024 at 11:14:12AM +0800, Huang Shijie wrote: (0) We list the ARCHs which support the NUMA: arm64, loongarch, powerpc, riscv, sparc, mips, s390, x86, I do not understand this format, what are you saying here? Sorry for t

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-18 Thread Shijie Huang
在 2024/1/19 12:42, Yury Norov 写道: This adds another level of indirection, I think. Currently cpu_to_node is a simple inliner. After the patch it would be a real function with all the associate overhead. Can you share a bloat-o-meter output here? #./scripts/bloat-o-meter vmlinux vmlinux.new add

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-18 Thread Shijie Huang
在 2024/1/19 14:46, Shijie Huang 写道: 在 2024/1/19 12:42, Yury Norov 写道: This adds another level of indirection, I think. Currently cpu_to_node is a simple inliner. After the patch it would be a real function with all the associate overhead. Can you share a bloat-o-meter output here

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-18 Thread Shijie Huang
在 2024/1/19 12:42, Yury Norov 写道: Regardless, I don't think that the approach is correct. As per your description, some initialization functions erroneously call cpu_to_node() instead of early_cpu_to_node() which exists specifically for that case. I checked the code again. The sparc, mips an

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-19 Thread Shijie Huang
在 2024/1/19 16:42, Mike Rapoport 写道: On Fri, Jan 19, 2024 at 02:46:16PM +0800, Shijie Huang wrote: 在 2024/1/19 12:42, Yury Norov 写道: This adds another level of indirection, I think. Currently cpu_to_node is a simple inliner. After the patch it would be a real function with all the associate

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-21 Thread Shijie Huang
在 2024/1/20 2:02, Yury Norov 写道: [EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please be mindful of safe email handling and proprietary information protection practices.] On Fri, Jan 19, 2024 at 04:50:53PM +0800, Shijie Huang wrote: 在 2024/1/19 16:42, Mike

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-22 Thread Shijie Huang
在 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

Re: [PATCH v2] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-24 Thread Shijie Huang
在 2024/1/25 1:19, Lameter, Christopher 写道: On Tue, 23 Jan 2024, Huang Shijie wrote: During the kernel booting, the generic cpu_to_node() is called too early in arm64, powerpc and riscv when CONFIG_NUMA is enabled. For arm64/powerpc/riscv, there are at least four places in the common code

Re: [PATCH v2] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-25 Thread Shijie Huang
在 2024/1/25 15:31, Mike Rapoport 写道: On Wed, Jan 24, 2024 at 09:19:00AM -0800, Lameter, Christopher wrote: On Tue, 23 Jan 2024, Huang Shijie wrote: During the kernel booting, the generic cpu_to_node() is called too early in arm64, powerpc and riscv when CONFIG_NUMA is enabled. For arm64/pow

Re: [PATCH v3] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-03-27 Thread Shijie Huang
在 2024/3/28 2:17, Andrew Morton 写道: On Fri, 26 Jan 2024 14:44:51 +0800 Huang Shijie wrote: During the kernel booting, the generic cpu_to_node() is called too early in arm64, powerpc and riscv when CONFIG_NUMA is enabled. There are at least four places in the common code where the generic c