diff options
author | Mel Gorman <mgorman@suse.de> | 2014-06-04 19:10:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:09 -0400 |
commit | b745bc85f21ea707e4ea1a91948055fa3e72c77b (patch) | |
tree | e4d4e8b52ca84acf64b2f333485ecb6edcab8738 /mm/swap.c | |
parent | 7aeb09f9104b760fc53c98cb7d20d06640baf9e6 (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/swap.c')
-rw-r--r-- | mm/swap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -67,7 +67,7 @@ static void __page_cache_release(struct page *page) | |||
67 | static void __put_single_page(struct page *page) | 67 | static void __put_single_page(struct page *page) |
68 | { | 68 | { |
69 | __page_cache_release(page); | 69 | __page_cache_release(page); |
70 | free_hot_cold_page(page, 0); | 70 | free_hot_cold_page(page, false); |
71 | } | 71 | } |
72 | 72 | ||
73 | static void __put_compound_page(struct page *page) | 73 | static void __put_compound_page(struct page *page) |
@@ -860,7 +860,7 @@ void lru_add_drain_all(void) | |||
860 | * grabbed the page via the LRU. If it did, give up: shrink_inactive_list() | 860 | * grabbed the page via the LRU. If it did, give up: shrink_inactive_list() |
861 | * will free it. | 861 | * will free it. |
862 | */ | 862 | */ |
863 | void release_pages(struct page **pages, int nr, int cold) | 863 | void release_pages(struct page **pages, int nr, bool cold) |
864 | { | 864 | { |
865 | int i; | 865 | int i; |
866 | LIST_HEAD(pages_to_free); | 866 | LIST_HEAD(pages_to_free); |