commit | 11ac3e87ce09c27f4587a8c4fe0829d814021a82 | [log] [tgz] |
---|---|---|
author | Zi Yan <[email protected]> | Thu May 12 20:22:58 2022 -0700 |
committer | Andrew Morton <[email protected]> | Fri May 13 07:20:13 2022 -0700 |
tree | c08ccaeb2783f435b010e075ec44cff22634f87c | |
parent | 6e263fff1de48fcd97b680b54cd8d1695fc3c776 [diff] [blame] |
mm: cma: use pageblock_order as the single alignment Now alloc_contig_range() works at pageblock granularity. Change CMA allocation, which uses alloc_contig_range(), to use pageblock_nr_pages alignment. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Zi Yan <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Eric Ren <[email protected]> Cc: kernel test robot <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
diff --git a/include/linux/cma.h b/include/linux/cma.h index a6f6373..63873b9 100644 --- a/include/linux/cma.h +++ b/include/linux/cma.h
@@ -17,11 +17,11 @@ #define CMA_MAX_NAME 64 /* - * TODO: once the buddy -- especially pageblock merging and alloc_contig_range() + * the buddy -- especially pageblock merging and alloc_contig_range() * -- can deal with only some pageblocks of a higher-order page being * MIGRATE_CMA, we can use pageblock_nr_pages. */ -#define CMA_MIN_ALIGNMENT_PAGES MAX_ORDER_NR_PAGES +#define CMA_MIN_ALIGNMENT_PAGES pageblock_nr_pages #define CMA_MIN_ALIGNMENT_BYTES (PAGE_SIZE * CMA_MIN_ALIGNMENT_PAGES) struct cma;