mm/page_alloc: make deferred page init free pages in MAX_ORDER blocks
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 21 Mar 2023 00:24:15 +0000 (03:24 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Apr 2023 02:42:56 +0000 (19:42 -0700)
commit3f6dac0fd1b83178137e7b4e722d8f29612cbec1
tree6b9a8fa620188bdcf6eeaf166d14de645d02429c
parent4a06f6f3d395d15eb285606f28b74ce5dbc77e52
mm/page_alloc: make deferred page init free pages in MAX_ORDER blocks

Normal page init path frees pages during the boot in MAX_ORDER chunks, but
deferred page init path does it in pageblock blocks.

Change deferred page init path to work in MAX_ORDER blocks.

For cases when MAX_ORDER is larger than pageblock, set migrate type to
MIGRATE_MOVABLE for all pageblocks covered by the page.

Link: https://lkml.kernel.org/r/20230321002415.20843-1-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mmzone.h
mm/mm_init.c