]> Git Repo - linux.git/commit
mm: make alloc_contig_range work at pageblock granularity
authorZi Yan <[email protected]>
Fri, 13 May 2022 03:22:58 +0000 (20:22 -0700)
committerAndrew Morton <[email protected]>
Fri, 13 May 2022 14:20:13 +0000 (07:20 -0700)
commitb2c9e2fbba32539626522b6aed30d1dde7b7e971
treebcfc416b5ef0adf5f41d4d09175a736a1bd3b98a
parent844fbae63e468e32e3a3970868602a4bb658aff9
mm: make alloc_contig_range work at pageblock granularity

alloc_contig_range() worked at MAX_ORDER_NR_PAGES granularity to avoid
merging pageblocks with different migratetypes.  It might unnecessarily
convert extra pageblocks at the beginning and at the end of the range.
Change alloc_contig_range() to work at pageblock granularity.

Special handling is needed for free pages and in-use pages across the
boundaries of the range specified by alloc_contig_range().  Because these=

Partially isolated pages causes free page accounting issues.  The free
pages will be split and freed into separate migratetype lists; the in-use=

Pages will be migrated then the freed pages will be handled in the
aforementioned way.

[[email protected]: fix deadlock/crash]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Zi Yan <[email protected]>
Reported-by: kernel test robot <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Eric Ren <[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]>
include/linux/page-isolation.h
mm/internal.h
mm/memory_hotplug.c
mm/page_alloc.c
mm/page_isolation.c
This page took 0.060001 seconds and 4 git commands to generate.