aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMel Gorman <[email protected]>2010-05-24 14:32:26 -0700
committerLinus Torvalds <[email protected]>2010-05-25 08:06:59 -0700
commitc175a0ce7584e5b498fff8cbdb9aa7912aa9fbba (patch)
treedd924daef4a9e0ac9729c5b61c30b8e3cc96f971 /include/linux
parentf1a5ab1210579e2d3ac8c0c227645823af5aafb0 (diff)
mm: move definition for LRU isolation modes to a header
Currently, vmscan.c defines the isolation modes for __isolate_lru_page(). Memory compaction needs access to these modes for isolating pages for migration. This patch exports them. Signed-off-by: Mel Gorman <[email protected]> Acked-by: Christoph Lameter <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Minchan Kim <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/swap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 600b03b7732e..1e8ce148d058 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -229,6 +229,11 @@ static inline void lru_cache_add_file(struct page *page)
__lru_cache_add(page, LRU_INACTIVE_FILE);
}
+/* LRU Isolation modes. */
+#define ISOLATE_INACTIVE 0 /* Isolate inactive pages. */
+#define ISOLATE_ACTIVE 1 /* Isolate active pages. */
+#define ISOLATE_BOTH 2 /* Isolate both active and inactive pages. */
+
/* linux/mm/vmscan.c */
extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
gfp_t gfp_mask, nodemask_t *mask);