mm/compaction: split freepages without holding the zone lock
Subsystems (3)
[email protected]
maintainerPATCH 55/126 mm/compaction: split freepages without holding the zone lock
From: Joonsoo Kim <[email protected]>
Subject: mm/compaction: split freepages without holding the zone lock
We don't need to split freepages with holding the zone lock. It will cause more contention on zone lock so not desirable.
[[email protected]: if __isolate_free_page() fails, avoid adding to freelist so we don't call map_pages() with it]
Signed-off-by Joonsoo Kim <[email protected]>
Acked-by Vlastimil Babka <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Alexander Potapenko <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Michal Hocko <[email protected]>
Signed-off-by David Rientjes <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/linux/mm.h | 1 mm/compaction.c | 47 ++++++++++++++++++++++++++++++------------- mm/page_alloc.c | 27 ------------------------ 3 files changed, 33 insertions(+), 42 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mm-compaction-split-freepages-without-holding-the-zone-lock +0 -1
@@ -537,7 +537,6 @@ void __put_page(struct page *page);void put_pages_list (struct list_head *pages);void split_page (struct page *page,unsigned int order); -int split_free_page (struct page *page);/* * Compound pages have a destructor function. Provide a
mm/compaction.c renamed from mm/compaction.c~mm-compaction-split-freepages-without-holding-the-zone-lock +33 -14
89 lines not on this page · raw message
mm/page_alloc.c renamed from mm/page_alloc.c~mm-compaction-split-freepages-without-holding-the-zone-lock +0 -25
@@ -2527,33 +2527,6 @@ int __isolate_free_page(struct page *pag }/* -* Similar to split_page except the page is already free. As this is only -* being used for migration, the migratetype of the block also changes. -* As this is called with interrupts disabled, the caller is responsible -* for calling arch_alloc_page() and kernel_map_page() after interrupts -* are enabled. -* -* Note: this is probably too low level an operation for use in drivers. -* Please consult with lkml before using this in your driver. -*/ -int split_free_page (struct page *page) -{ -unsigned int order; -int nr_pages; - - order =page_order (page); - - nr_pages =__isolate_free_page (page, order); -if (!nr_pages) -return 0 ; - -/* Split into individual pages */ -set_page_refcounted (page); -split_page (page, order); -return nr_pages; -}