Skip to contentSkip to conversation

ia64-forbid-using-virtual_mem_map-with-flatmem.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 15, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: ia64: forbid using VIRTUAL_MEM_MAP with FLATMEM
has been removed from the -mm tree. Its filename was
ia64-forbid-using-virtual_mem_map-with-flatmem.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Mike Rapoport <[email protected]>
Subject: ia64: forbid using VIRTUAL_MEM_MAP with FLATMEM

Virtual memory map was intended to avoid wasting memory on the memory map on systems with large holes in the physical memory layout. Long ago it been superseded first by DISCONTIGMEM and then by SPARSEMEM. Moreover, SPARSEMEM_VMEMMAP provide the same functionality in much more portable way.

As the first step to removing the VIRTUAL_MEM_MAP forbid it's usage with FLATMEM and panic on systems with large holes in the physical memory layout that try to run FLATMEM kernels.

Cc Alexey Dobriyan <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Greg Ungerer <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Matt Turner <[email protected]>
Cc Meelis Roos <[email protected]>
Cc Michael Schmitz <[email protected]>
Cc Russell King <[email protected]>
Cc Tony Luck <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Will Deacon <[email protected]>

---

 arch/ia64/Kconfig               |    2 -
 arch/ia64/include/asm/meminit.h |    2 -
 arch/ia64/mm/contig.c           |   52 +++++++++++++-----------------
 arch/ia64/mm/init.c             |   14 --------
 4 files changed, 24 insertions(+), 46 deletions(-)
arch/ia64/include/asm/meminit.h renamed from arch/ia64/include/asm/meminit.h~ia64-forbid-using-virtual_mem_map-with-flatmem +0 -2
@@ -59,10 +59,8 @@ extern int reserve_elfcorehdr(u64 *start
 extern int register_active_ranges(u64 start, u64 len, int nid);
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
-# define LARGE_GAP	0x40000000 /* Use virtual mem map if hole is > than this */
   extern unsigned long VMALLOC_END;
   extern struct page *vmem_map;
-  extern int find_largest_hole(u64 start, u64 end, void *arg);
   extern int create_mem_map_page_table(u64 start, u64 end, void *arg);
   extern int vmemmap_find_next_valid_pfn(int, int);
 #else
arch/ia64/Kconfig renamed from arch/ia64/Kconfig~ia64-forbid-using-virtual_mem_map-with-flatmem +1 -1
@@ -329,7 +329,7 @@ config NODES_SHIFT
 # VIRTUAL_MEM_MAP has been retained for historical reasons.
 config VIRTUAL_MEM_MAP
 	bool "Virtual mem map"
-	depends on !SPARSEMEM
+	depends on !SPARSEMEM && !FLATMEM
 	default y
 	help
 	  Say Y to compile the kernel with support for a virtual mem map.
arch/ia64/mm/contig.c renamed from arch/ia64/mm/contig.c~ia64-forbid-using-virtual_mem_map-with-flatmem +23 -29

78 lines not on this page · raw message

arch/ia64/mm/init.c renamed from arch/ia64/mm/init.c~ia64-forbid-using-virtual_mem_map-with-flatmem +0 -14
@@ -574,20 +574,6 @@ ia64_pfn_valid (unsigned long pfn)
 }
 EXPORT_SYMBOL(ia64_pfn_valid);
 
-int __init find_largest_hole(u64 start, u64 end, void *arg)
-{
-	u64 *max_gap = arg;
-
-	static u64 last_end = PAGE_OFFSET;
-
-	/* NOTE: this algorithm assumes efi memmap table is ordered */
-
-	if (*max_gap < (start - last_end))
-		*max_gap = start - last_end;
-	last_end = end;
-	return 0;
-}
-
 #endif /* CONFIG_VIRTUAL_MEM_MAP */
 
 int __init register_active_ranges(u64 start, u64 len, int nid)

_

Patches currently in -mm which might be from [email protected] are

mm-memblock-enforce-overlap-of-memorymemblock-and-memoryreserved.patch mm-fix-initialization-of-struct-page-for-holes-in-memory-layout.patch mm-add-definition-of-pmd_page_order.patch mmap-make-mlock_future_check-global.patch set_memory-allow-set_direct_map__noflush-for-multiple-pages.patch set_memory-allow-querying-whether-set_direct_map_-is-actually-enabled.patch mm-introduce-memfd_secret-system-call-to-create-secret-memory-areas.patch secretmem-use-pmd-size-pages-to-amortize-direct-map-fragmentation.patch secretmem-add-memcg-accounting.patch pm-hibernate-disable-when-there-are-active-secretmem-users.patch arch-mm-wire-up-memfd_secret-system-call-were-relevant.patch secretmem-test-add-basic-selftest-for-memfd_secret2.patch