diff options
author | Rafael Aquini <aquini@redhat.com> | 2012-12-11 19:02:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 20:22:27 -0500 |
commit | 5733c7d11dff44e98d2ca16617886a78086b354f (patch) | |
tree | 2d7b982297b3be46b765123fad9d7d446b4cbdb3 /include/linux/migrate.h | |
parent | e22504296d4f64fbbbd741602ab47ee874649c18 (diff) |
mm: introduce putback_movable_pages()
The PATCH "mm: introduce compaction and migration for virtio ballooned pages"
hacks around putback_lru_pages() in order to allow ballooned pages to be
re-inserted on balloon page list as if a ballooned page was like a LRU page.
As ballooned pages are not legitimate LRU pages, this patch introduces
putback_movable_pages() to properly cope with cases where the isolated
pageset contains ballooned pages and LRU pages, thus fixing the mentioned
inelegant hack around putback_lru_pages().
Signed-off-by: Rafael Aquini <aquini@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/migrate.h')
-rw-r--r-- | include/linux/migrate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index ce42847ed35f..0b5865c61efd 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -27,6 +27,7 @@ typedef struct page *new_page_t(struct page *, unsigned long private, int **); | |||
27 | #ifdef CONFIG_MIGRATION | 27 | #ifdef CONFIG_MIGRATION |
28 | 28 | ||
29 | extern void putback_lru_pages(struct list_head *l); | 29 | extern void putback_lru_pages(struct list_head *l); |
30 | extern void putback_movable_pages(struct list_head *l); | ||
30 | extern int migrate_page(struct address_space *, | 31 | extern int migrate_page(struct address_space *, |
31 | struct page *, struct page *, enum migrate_mode); | 32 | struct page *, struct page *, enum migrate_mode); |
32 | extern int migrate_pages(struct list_head *l, new_page_t x, | 33 | extern int migrate_pages(struct list_head *l, new_page_t x, |
@@ -50,6 +51,7 @@ extern int migrate_huge_page_move_mapping(struct address_space *mapping, | |||
50 | #else | 51 | #else |
51 | 52 | ||
52 | static inline void putback_lru_pages(struct list_head *l) {} | 53 | static inline void putback_lru_pages(struct list_head *l) {} |
54 | static inline void putback_movable_pages(struct list_head *l) {} | ||
53 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 55 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
54 | unsigned long private, bool offlining, | 56 | unsigned long private, bool offlining, |
55 | enum migrate_mode mode) { return -ENOSYS; } | 57 | enum migrate_mode mode) { return -ENOSYS; } |