aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2014-06-04 19:10:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:09 -0400
commitcfc47a2803db42140167b92d991ef04018e162c7 (patch)
tree45ba771f22c0f284cc132133933b7eb9a9a415b5 /mm
parentdc4b0caff24d9b2918e9f27bc65499ee63187eba (diff)
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: Mel Gorman <mgorman@suse.de> Acked-by: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jan Kara <jack@suse.cz> Cc: Michal Hocko <mhocko@suse.cz> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Theodore Ts'o <tytso@mit.edu> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6cadc8678e28..ce4d3716214c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -774,9 +774,9 @@ static void __free_pages_ok(struct page *page, unsigned int order)
774 if (!free_pages_prepare(page, order)) 774 if (!free_pages_prepare(page, order))
775 return; 775 return;
776 776
777 migratetype = get_pfnblock_migratetype(page, pfn);
777 local_irq_save(flags); 778 local_irq_save(flags);
778 __count_vm_events(PGFREE, 1 << order); 779 __count_vm_events(PGFREE, 1 << order);
779 migratetype = get_pfnblock_migratetype(page, pfn);
780 set_freepage_migratetype(page, migratetype); 780 set_freepage_migratetype(page, migratetype);
781 free_one_page(page_zone(page), page, pfn, order, migratetype); 781 free_one_page(page_zone(page), page, pfn, order, migratetype);
782 local_irq_restore(flags); 782 local_irq_restore(flags);