diff options
author | Muchun Song <songmuchun@bytedance.com> | 2022-05-14 01:48:56 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-05-14 01:48:56 +0200 |
commit | 6e02c46b4d970f24eb51197d451b00f08a8a4186 (patch) | |
tree | a282366506ab21104487efa31b74a979f4898908 /mm/hugetlb_vmemmap.c | |
parent | mm: hugetlb_vmemmap: disable hugetlb_optimize_vmemmap when struct page crosse... (diff) | |
download | linux-6e02c46b4d970f24eb51197d451b00f08a8a4186.tar.xz linux-6e02c46b4d970f24eb51197d451b00f08a8a4186.zip |
mm: memory_hotplug: override memmap_on_memory when hugetlb_free_vmemmap=on
Optimizing HugeTLB vmemmap pages is not compatible with allocating memmap
on hot added memory. If "hugetlb_free_vmemmap=on" and
memory_hotplug.memmap_on_memory" are both passed on the kernel command
line, optimizing hugetlb pages takes precedence. However, the global
variable memmap_on_memory will still be set to 1, even though we will not
try to allocate memmap on hot added memory.
Also introduce mhp_memmap_on_memory() helper to move the definition of
"memmap_on_memory" to the scope of CONFIG_MHP_MEMMAP_ON_MEMORY. In the
next patch, mhp_memmap_on_memory() will also be exported to be used in
hugetlb_vmemmap.c.
Link: https://lkml.kernel.org/r/20220512041142.39501-3-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Xiongchun Duan <duanxiongchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb_vmemmap.c')
0 files changed, 0 insertions, 0 deletions