Skip to content

Commit eddea3c

Browse files
committed
Merge: mm/mm_init.c: print mem_init info after defer_init is done
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6661 JIRA: https://issues.redhat.com/browse/RHEL-85565 Backport [mm fix](https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4f66da89d31c) to report nr_free_pages accurately on boot when DEFERRED_STRUCT_PAGE_INIT is used. Signed-off-by: Eric Chanudet <echanude@redhat.com> Approved-by: Waiman Long <longman@redhat.com> Approved-by: Rafael Aquini <raquini@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents c941530 + ec94e5c commit eddea3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mm/mm_init.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,7 @@ void set_zone_contiguous(struct zone *zone)
23682368
zone->contiguous = true;
23692369
}
23702370

2371+
static void __init mem_init_print_info(void);
23712372
void __init page_alloc_init_late(void)
23722373
{
23732374
struct zone *zone;
@@ -2394,6 +2395,8 @@ void __init page_alloc_init_late(void)
23942395
files_maxfiles_init();
23952396
#endif
23962397

2398+
/* Accounting of total+free memory is stable at this point. */
2399+
mem_init_print_info();
23972400
buffer_init();
23982401

23992402
/* Discard memblock private memory */
@@ -2772,7 +2775,6 @@ void __init mm_core_init(void)
27722775
kmsan_init_shadow();
27732776
stack_depot_early_init();
27742777
mem_init();
2775-
mem_init_print_info();
27762778
kmem_cache_init();
27772779
/*
27782780
* page_owner must be initialized after buddy is ready, and also after

0 commit comments

Comments
 (0)