Skip to content

Commit 5cd93c7

Browse files
RichardWeiYangjmberg-intel
authored andcommitted
um/mm: remove redundant assignment of max_low_pfn
Current calculation of max_low_pfn is introduced in commit af84eab ("[PATCH] uml: fix LVM crash"). It is intended to set max_low_pfn to the same value as max_pfn. But I am not sure why the max_pfn is set to totalram_pages, which represents the number of usable pages in system instead of an absolute page frame number. (The change history stops there.) While we have already calculate it in setup_physmem(), so not necessary to do it again. Also this would help changing totalram_pages accounting, since we plan to move the accounting into __free_pages_core(). With this change, totalram_pages may not represent the total usable pages at this point, since some pages would be deferred initialized. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> CC: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Alasdair G Kergon <agk@redhat.com> CC: Andrew Morton <akpm@linux-foundation.org> CC: Mike Rapoport (IBM) <rppt@kernel.org> CC: David Hildenbrand <david@redhat.com> Acked-by: Mike Rapoport (IBM) <rppt@kernel.org> Link: https://patch.msgid.link/20240615034150.2958-1-richard.weiyang@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent ab0f4ce commit 5cd93c7

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

arch/um/kernel/mem.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ void __init mem_init(void)
7373

7474
/* this will put all low memory onto the freelists */
7575
memblock_free_all();
76-
max_low_pfn = totalram_pages();
7776
max_pfn = max_low_pfn;
7877
kmalloc_ok = 1;
7978
}

0 commit comments

Comments
 (0)