Re: [RFC/RFT PATCH 6/6] riscv: Add numa support for riscv64 platform
From: Randy Dunlap
Date: Fri Aug 14 2020 - 19:22:20 EST
On 8/14/20 2:47 PM, Atish Patra wrote:
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 7b5905529146..4bd67f94aaac 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -137,7 +137,7 @@ config PAGE_OFFSET
> default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB
>
> config ARCH_FLATMEM_ENABLE
> - def_bool y
> + def_bool !NUMA
>
> config ARCH_SPARSEMEM_ENABLE
> def_bool y
> @@ -295,6 +295,35 @@ config TUNE_GENERIC
>
> endchoice
>
> +# Common NUMA Features
> +config NUMA
> + bool "Numa Memory Allocation and Scheduler Support"
NUMA
> + select GENERIC_ARCH_NUMA
> + select OF_NUMA
> + select ARCH_SUPPORTS_NUMA_BALANCING
> + help
> + Enable NUMA (Non-Uniform Memory Access) support.
> +
> + The kernel will try to allocate memory used by a CPU on the
> + local memory of the CPU and add some more NUMA awareness to the kernel.
> +
> +config NODES_SHIFT
> + int "Maximum NUMA Nodes (as a power of 2)"
> + range 1 10
> + default "2"
> + depends on NEED_MULTIPLE_NODES
> + help
> + Specify the maximum number of NUMA Nodes available on the target
> + system. Increases memory reserved to accommodate various tables.
> +
> +config USE_PERCPU_NUMA_NODE_ID
> + def_bool y
> + depends on NUMA
> +
> +config NEED_PER_CPU_EMBED_FIRST_CHUNK
> + def_bool y
> + depends on NUMA
> +
> config RISCV_ISA_C
> bool "Emit compressed instructions when building Linux"
> default y
thanks.
--
~Randy