summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSang-Heon Jeon <ekffu200098@gmail.com>2026-05-03 11:42:25 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-06-03 01:22:16 +0300
commitfb95c50921f0a65ef9fd734ae712e416db949d91 (patch)
treebcb4115d0a70cdcba99b2507b19564c0bad8bf74 /include
parent7d40e6b66d97d7feef8ca3c096827fd24c6d623d (diff)
downloadlinux-fb95c50921f0a65ef9fd734ae712e416db949d91.tar.xz
mm/hugetlb_cma: restrict hugetlb_cma parameter to gigantic-page alignment
Existing hugetlb_cma parameter handling logic rejects sizes smaller than one gigantic page, but rounds up larger sizes that are not a multiple of it. The two behaviors are inconsistent and neither is documented. To remove existing inconsistent and undefined behavior, restrict hugetlb_cma parameter to only accept multiples of the gigantic page size. After this restriction, the redundant round_up() in the allocation loop can be removed. The new restriction is also documented in kernel-parameters.txt. Also, including other minor changes for readability improvement with no functional change. Link: https://lore.kernel.org/20260503084225.415980-1-ekffu200098@gmail.com Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Suggested-by: Muchun Song <muchun.song@linux.dev> Acked-by: Muchun Song <muchun.song@linux.dev> Acked-by: Oscar Salvador <osalvador@suse.de> Cc: David Hildenbrand <david@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions