summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-11-27 11:13:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2024-11-27 11:13:25 -0800
commitab952fc5c736c54e3ffd577c3ffd54a2a1eb7803 (patch)
treef7e9f7823a65164b0204a2a74a42aa24d708d7be /mm
parentb5361254c9027c2b3730be1bebcdb37eed42e9a5 (diff)
parent98b7beba1ee6fb4ee755812e6c06cfc9084e7430 (diff)
Merge tag 'memblock-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock updates from Mike Rapoport: - replace hardcoded strings with str_on_off() in report_meminit() - initialize reserved pages to MIGRATE_MOVABLE when deferred struct page initialization is enabled so that if the reserved pages are freed they are put on movable free lists like it is done now when deferred struct page initialization is disabled * tag 'memblock-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: uniformly initialize all reserved pages to MIGRATE_MOVABLE mm: Use str_on_off() helper function in report_meminit()
Diffstat (limited to 'mm')
-rw-r--r--mm/mm_init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 1c205b0a86ed..24b68b425afb 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -722,6 +722,9 @@ static void __meminit init_reserved_page(unsigned long pfn, int nid)
break;
}
__init_single_page(pfn_to_page(pfn), pfn, zid, nid);
+
+ if (pageblock_aligned(pfn))
+ set_pageblock_migratetype(pfn_to_page(pfn), MIGRATE_MOVABLE);
}
#else
static inline void pgdat_set_deferred_range(pg_data_t *pgdat) {}
@@ -2572,8 +2575,8 @@ static void __init report_meminit(void)
stack = "off";
pr_info("mem auto-init: stack:%s, heap alloc:%s, heap free:%s\n",
- stack, want_init_on_alloc(GFP_KERNEL) ? "on" : "off",
- want_init_on_free() ? "on" : "off");
+ stack, str_on_off(want_init_on_alloc(GFP_KERNEL)),
+ str_on_off(want_init_on_free()));
if (want_init_on_free())
pr_info("mem auto-init: clearing system memory may take some time...\n");
}