Skip to content

Commit 3c5f2eb

Browse files
committed
s390/mm: avoid trimming to MAX_ORDER
Trimming to MAX_ORDER was originally done in order to avoid to set HOLES_IN_ZONE, which in turn would enable a quite expensive pfn_valid() check. pfn_valid() however only checks if a struct page exists for a given pfn. With sparsemen vmemmap there are always struct pages, since memmaps are allocated for whole sections. Therefore remove the HOLES_IN_ZONE comment and the trimming. Signed-off-by: Heiko Carstens <[email protected]>
1 parent a709423 commit 3c5f2eb

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

arch/s390/kernel/setup.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,14 +1126,6 @@ void __init setup_arch(char **cmdline_p)
11261126
free_mem_detect_info();
11271127
remove_oldmem();
11281128

1129-
/*
1130-
* Make sure all chunks are MAX_ORDER aligned so we don't need the
1131-
* extra checks that HOLES_IN_ZONE would require.
1132-
*
1133-
* Is this still required?
1134-
*/
1135-
memblock_trim_memory(1UL << (MAX_ORDER - 1 + PAGE_SHIFT));
1136-
11371129
if (is_prot_virt_host())
11381130
setup_uv();
11391131
setup_memory_end();

0 commit comments

Comments
 (0)