Commit cfc47a28 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds

mm: page_alloc: lookup pageblock migratetype with IRQs enabled during free

get_pageblock_migratetype() is called during free with IRQs disabled.
This is unnecessary and disables IRQs for longer than necessary.
Signed-off-by: default avatarMel Gorman <>
Acked-by: default avatarRik van Riel <>
Cc: Johannes Weiner <>
Acked-by: default avatarVlastimil Babka <>
Cc: Jan Kara <>
Cc: Michal Hocko <>
Cc: Hugh Dickins <>
Cc: Dave Hansen <>
Cc: Theodore Ts'o <>
Cc: "Paul E. McKenney" <>
Cc: Oleg Nesterov <>
Cc: Peter Zijlstra <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent dc4b0caf
......@@ -774,9 +774,9 @@ static void __free_pages_ok(struct page *page, unsigned int order)
if (!free_pages_prepare(page, order))
migratetype = get_pfnblock_migratetype(page, pfn);
__count_vm_events(PGFREE, 1 << order);
migratetype = get_pfnblock_migratetype(page, pfn);
set_freepage_migratetype(page, migratetype);
free_one_page(page_zone(page), page, pfn, order, migratetype);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment