Skip to content

Commit cc48be3

Browse files
Frank van der Lindenakpm00
authored andcommitted
mm/hugetlb: align cma on allocation order, not demotion order
Align the CMA area for hugetlb gigantic pages to their size, not the size that they can be demoted to. Otherwise there might be misaligned sections at the start and end of the CMA area that will never be used for hugetlb page allocations. Link: https://lkml.kernel.org/r/[email protected] Fixes: a01f439 ("hugetlb: be sure to free demoted CMA pages to CMA") Signed-off-by: Frank van der Linden <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Roman Gushchin <[email protected]> Cc: Muchun Song <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 2acf045 commit cc48be3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/hugetlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7800,7 +7800,7 @@ void __init hugetlb_cma_reserve(int order)
78007800
* huge page demotion.
78017801
*/
78027802
res = cma_declare_contiguous_nid(0, size, 0,
7803-
PAGE_SIZE << HUGETLB_PAGE_ORDER,
7803+
PAGE_SIZE << order,
78047804
HUGETLB_PAGE_ORDER, false, name,
78057805
&hugetlb_cma[nid], nid);
78067806
if (res) {

0 commit comments

Comments
 (0)