[PATCH 07/14] Move definition for LRU isolation modes to a header

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mel Gorman
Date: Friday, April 2, 2010 - 9:02 am

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 <mel@csn.ul.ie>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
---
 include/linux/swap.h |    5 +++++
 mm/vmscan.c          |    5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 1f59d93..986b12d 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -238,6 +238,11 @@ static inline void lru_cache_add_active_file(struct page *page)
 	__lru_cache_add(page, LRU_ACTIVE_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);
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 79c8098..ef89600 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -839,11 +839,6 @@ keep:
 	return nr_reclaimed;
 }
 
-/* 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. */
-
 /*
  * Attempt to remove the specified page from its LRU.  Only take this page
  * if it is of the appropriate PageActive status.  Pages which are being
-- 
1.6.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/14] Memory Compaction v7, Mel Gorman, (Fri Apr 2, 9:02 am)
[PATCH 07/14] Move definition for LRU isolation modes to a ..., Mel Gorman, (Fri Apr 2, 9:02 am)
[PATCH 08/14] Memory compaction core, Mel Gorman, (Fri Apr 2, 9:02 am)
Re: [PATCH 14/14] mm,migration: Allow the migration of Pag ..., KAMEZAWA Hiroyuki, (Mon Apr 5, 11:54 pm)
[No subject], Tarkan Erimer, (Tue Apr 6, 7:47 am)
[No subject], Mel Gorman, (Tue Apr 6, 8:00 am)
[No subject], Tarkan Erimer, (Tue Apr 6, 8:03 am)
[No subject], Minchan Kim, (Tue Apr 6, 8:37 am)
Re: [PATCH 08/14] Memory compaction core, Andrew Morton, (Tue Apr 6, 5:05 pm)
Re: [PATCH 08/14] Memory compaction core, Mel Gorman, (Wed Apr 7, 8:21 am)
Re: [PATCH 08/14] Memory compaction core, Mel Gorman, (Thu Apr 8, 9:59 am)
Re: [PATCH 08/14] Memory compaction core, Andrea Arcangeli, (Thu Apr 8, 10:06 am)