aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-02-01 06:05:38 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:16 -0500
commita48d07afdf18212de22b959715b16793c5a6e57a (patch)
tree36d5963c29ceb5c2f6df53036cef5c0d30383dbf /include
parentb16664e44c54525be89dc07ad15a13b4eeec5634 (diff)
[PATCH] Direct Migration V9: migrate_pages() extension
Add direct migration support with fall back to swap. Direct migration support on top of the swap based page migration facility. This allows the direct migration of anonymous pages and the migration of file backed pages by dropping the associated buffers (requires writeout). Fall back to swap out if necessary. The patch is based on lots of patches from the hotplug project but the code was restructured, documented and simplified as much as possible. Note that an additional patch that defines the migrate_page() method for filesystems is necessary in order to avoid writeback for anonymous and file backed pages. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Mike Kravetz <kravetz@us.ibm.com> Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rmap.h4
-rw-r--r--include/linux/swap.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 9d6fbeef2104..0f1ea2d6ed86 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -91,7 +91,7 @@ static inline void page_dup_rmap(struct page *page)
91 * Called from mm/vmscan.c to handle paging out 91 * Called from mm/vmscan.c to handle paging out
92 */ 92 */
93int page_referenced(struct page *, int is_locked); 93int page_referenced(struct page *, int is_locked);
94int try_to_unmap(struct page *); 94int try_to_unmap(struct page *, int ignore_refs);
95 95
96/* 96/*
97 * Called from mm/filemap_xip.c to unmap empty zero page 97 * Called from mm/filemap_xip.c to unmap empty zero page
@@ -111,7 +111,7 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *);
111#define anon_vma_link(vma) do {} while (0) 111#define anon_vma_link(vma) do {} while (0)
112 112
113#define page_referenced(page,l) TestClearPageReferenced(page) 113#define page_referenced(page,l) TestClearPageReferenced(page)
114#define try_to_unmap(page) SWAP_FAIL 114#define try_to_unmap(page, refs) SWAP_FAIL
115 115
116#endif /* CONFIG_MMU */ 116#endif /* CONFIG_MMU */
117 117
diff --git a/include/linux/swap.h b/include/linux/swap.h
index e53fef7051e6..d359fc022433 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -191,6 +191,8 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
191#ifdef CONFIG_MIGRATION 191#ifdef CONFIG_MIGRATION
192extern int isolate_lru_page(struct page *p); 192extern int isolate_lru_page(struct page *p);
193extern int putback_lru_pages(struct list_head *l); 193extern int putback_lru_pages(struct list_head *l);
194extern int migrate_page(struct page *, struct page *);
195extern void migrate_page_copy(struct page *, struct page *);
194extern int migrate_pages(struct list_head *l, struct list_head *t, 196extern int migrate_pages(struct list_head *l, struct list_head *t,
195 struct list_head *moved, struct list_head *failed); 197 struct list_head *moved, struct list_head *failed);
196#else 198#else