diff options
author | Minchan Kim <minchan.kim@gmail.com> | 2011-10-31 20:06:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:44 -0400 |
commit | 4356f21d09283dc6d39a6f7287a65ddab61e2808 (patch) | |
tree | 34822a1662ea83291455834556a4fb5bf98ecd72 /mm/memcontrol.c | |
parent | b9e84ac1536d35aee03b2601f19694949f0bd506 (diff) |
mm: change isolate mode from #define to bitwise type
Change ISOLATE_XXX macro with bitwise isolate_mode_t type. Normally,
macro isn't recommended as it's type-unsafe and making debugging harder as
symbol cannot be passed throught to the debugger.
Quote from Johannes
" Hmm, it would probably be cleaner to fully convert the isolation mode
into independent flags. INACTIVE, ACTIVE, BOTH is currently a
tri-state among flags, which is a bit ugly."
This patch moves isolate mode from swap.h to mmzone.h by memcontrol.h
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 3508777837c7..2d5755544afe 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1185,7 +1185,8 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page) | |||
1185 | unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 1185 | unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
1186 | struct list_head *dst, | 1186 | struct list_head *dst, |
1187 | unsigned long *scanned, int order, | 1187 | unsigned long *scanned, int order, |
1188 | int mode, struct zone *z, | 1188 | isolate_mode_t mode, |
1189 | struct zone *z, | ||
1189 | struct mem_cgroup *mem_cont, | 1190 | struct mem_cgroup *mem_cont, |
1190 | int active, int file) | 1191 | int active, int file) |
1191 | { | 1192 | { |