Re: [PATCH v2 1/3] mm: vmalloc: Let user to control huge vmalloc default behavior
From: Kefeng Wang <hidden>
Date: 2022-01-19 12:58:04
Also in:
linux-arm-kernel, linux-doc, linux-mm, lkml
From: Kefeng Wang <hidden>
Date: 2022-01-19 12:58:04
Also in:
linux-arm-kernel, linux-doc, linux-mm, lkml
On 2022/1/18 10:52, Nicholas Piggin wrote:
Excerpts from Kefeng Wang's message of December 28, 2021 12:59 am:quoted
Introduce HUGE_VMALLOC_DEFAULT_ENABLED and make it default y, this let user to choose whether or not enable huge vmalloc mappings by default. Meanwhile, add new hugevmalloc=on/off parameter to enable or disable this feature at boot time, nohugevmalloc is still supported and equivalent to hugevmalloc=off.Runtime options are bad enough, Kconfig and boot options are even worse.
nohugevmalloc is like blacklists, on the other hand, Add a HUGE_VMALLOC_DEFAULT_ENABLED to close hugevmalloc default and enable it only via hugevmalloc=on is whiteList. Only parts of our products wants this feature, we add some interfaces which only alloc hugevmalloc for them, eg, vmap_hugepage/vmalloc_hugepage/remap_vmalloc_hugepage_range.. for our products, but it's not the choice of most products, also add nohugevmalloc for most products is expensive, so this is the reason for adding the patch. more config/cmdline are more flexible for test/products,
The 'nohugevmalloc' option mirrors 'nohugeiomap' and is not expected to ever be understood by an administrator unless a kernel developer is working with them to hunt down a regression. IMO there should be no new options. You could switch it off for CONFIG_BASE_SMALL perhaps, and otherwise just try to work on heuristics first. Bring in new options once it's proven they're needed.
but yes, this patch is optional, could others give some more comments about this way? Thanks.
Aside from that, thanks for working on these ports, great work. Thanks, Nick .