aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2014-06-04 19:10:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:09 -0400
commitb745bc85f21ea707e4ea1a91948055fa3e72c77b (patch)
treee4d4e8b52ca84acf64b2f333485ecb6edcab8738 /mm/vmscan.c
parent7aeb09f9104b760fc53c98cb7d20d06640baf9e6 (diff)
mm: page_alloc: convert hot/cold parameter and immediate callers to bool
cold is a bool, make it one. Make the likely case the "if" part of the block instead of the else as according to the optimisation manual this is preferred. Signed-off-by: Mel Gorman <mgorman@suse.de> Acked-by: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: 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/vmscan.c')
-rw-r--r--mm/vmscan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9253e188000f..494cd632178c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1121,7 +1121,7 @@ keep:
1121 VM_BUG_ON_PAGE(PageLRU(page) || PageUnevictable(page), page); 1121 VM_BUG_ON_PAGE(PageLRU(page) || PageUnevictable(page), page);
1122 } 1122 }
1123 1123
1124 free_hot_cold_page_list(&free_pages, 1); 1124 free_hot_cold_page_list(&free_pages, true);
1125 1125
1126 list_splice(&ret_pages, page_list); 1126 list_splice(&ret_pages, page_list);
1127 count_vm_events(PGACTIVATE, pgactivate); 1127 count_vm_events(PGACTIVATE, pgactivate);
@@ -1532,7 +1532,7 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
1532 1532
1533 spin_unlock_irq(&zone->lru_lock); 1533 spin_unlock_irq(&zone->lru_lock);
1534 1534
1535 free_hot_cold_page_list(&page_list, 1); 1535 free_hot_cold_page_list(&page_list, true);
1536 1536
1537 /* 1537 /*
1538 * If reclaim is isolating dirty pages under writeback, it implies 1538 * If reclaim is isolating dirty pages under writeback, it implies
@@ -1755,7 +1755,7 @@ static void shrink_active_list(unsigned long nr_to_scan,
1755 __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, -nr_taken); 1755 __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, -nr_taken);
1756 spin_unlock_irq(&zone->lru_lock); 1756 spin_unlock_irq(&zone->lru_lock);
1757 1757
1758 free_hot_cold_page_list(&l_hold, 1); 1758 free_hot_cold_page_list(&l_hold, true);
1759} 1759}
1760 1760
1761#ifdef CONFIG_SWAP 1761#ifdef CONFIG_SWAP