riscv: mm: Add FORCE_MAX_ZONEORDER and default to 13

Add FORCE_MAX_ZONEORDER to support custom max order requirements.
Default 13 is 16MB for requesting large(16MB) contiguous memory.

port from:
https://github.com/T-head-Semi/linux/commit/
2891dd00c44603131111925b918e3102946ee999
This commit is contained in:
xiaoguang.xing 2023-02-16 11:10:54 +08:00 committed by Xiaoguang Xing
parent 0fd1c703d3
commit 96ee5553b7
1 changed files with 14 additions and 0 deletions

View File

@ -354,6 +354,20 @@ config HIGHMEM
Enable high memory support on riscv64 which uses supports
max 39-bit virtual address spaces.
config FORCE_MAX_ZONEORDER
int "Maximum zone order"
default 13
help
The kernel memory allocator divides physically contiguous memory
blocks into "zones", where each zone is a power of two number of
pages. This option selects the largest power of two that the kernel
keeps in the memory allocator. If you need to allocate very large
blocks of physically contiguous memory, then you may need to
increase this value.
This config option is actually maximum order plus one. For example,
a value of 13 means that the largest free memory block is 2^12 pages.
# Common NUMA Features
config NUMA
bool "NUMA Memory Allocation and Scheduler Support"