mm-sparsec-use-kvmalloc-kvfree-to-alloc-free-memmap-for-the-classic-sparse.patch removed from -mm tree
The patch titled
Subject: mm/sparse.c: use kvmalloc/kvfree to alloc/free memmap for the classic sparse
has been removed from the -mm tree. Its filename was
mm-sparsec-use-kvmalloc-kvfree-to-alloc-free-memmap-for-the-classic-sparse.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Baoquan He <[email protected]>
Subject: mm/sparse.c: use kvmalloc/kvfree to alloc/free memmap for the classic sparse
This change makes populate_section_memmap()/depopulate_section_memmap much simpler.
Signed-off-by Baoquan He <[email protected]>
Suggested-by Michal Hocko <[email protected]>
Reviewed-by David Hildenbrand <[email protected]>
Acked-by Michal Hocko <[email protected]>
Reviewed-by Pankaj Gupta <[email protected]>
Reviewed-by Matthew Wilcox (Oracle) <[email protected]>
Reviewed-by Wei Yang <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/sparse.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-)
mm/sparse.c renamed from mm/sparse.c~mm-sparsec-use-kvmalloc-kvfree-to-alloc-free-memmap-for-the-classic-sparse +2 -18
@@ -664,35 +664,14 @@ static void free_map_bootmem(struct pagestruct page *__meminit populate_section_memmap (unsigned long pfn,unsigned long nr_pages,int nid,struct vmem_altmap *altmap) { -struct page *page, *ret; -unsigned long memmap_size =sizeof (struct page ) *PAGES_PER_SECTION ; - - page =alloc_pages (GFP_KERNEL |__GFP_NOWARN,get_order (memmap_size)); -if (page) - goto got_map_page; - - ret =vmalloc (memmap_size); -if (ret) - goto got_map_ptr; - -return NULL ; -got_map_page: - ret = (struct page *)pfn_to_kaddr (page_to_pfn (page)); -got_map_ptr: - -return ret; +return kvmalloc (array_size (sizeof (struct page ), +PAGES_PER_SECTION ),GFP_KERNEL ); }static void depopulate_section_memmap (unsigned long pfn,unsigned long nr_pages,struct vmem_altmap *altmap) { -struct page *memmap =pfn_to_page (pfn);