diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2012-07-31 19:42:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:40 -0400 |
commit | 189ebff2894a9d0f4e250dd1e154d282ef0a6779 (patch) | |
tree | e498573190660e2cfe6f64ff3fcc8cf3d44a58da /include/linux | |
parent | 24669e58477e2752c1fbca9c1c988e9dd0d79d15 (diff) |
hugetlb: simplify migrate_huge_page()
Since we migrate only one hugepage, don't use linked list for passing the
page around. Directly pass the page that need to be migrated as argument.
This also removes the usage of page->lru in the migrate path.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Hillf Danton <dhillf@gmail.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/migrate.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 855c337b20c3..ce7e6671968b 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -15,7 +15,7 @@ extern int migrate_page(struct address_space *, | |||
15 | extern int migrate_pages(struct list_head *l, new_page_t x, | 15 | extern int migrate_pages(struct list_head *l, new_page_t x, |
16 | unsigned long private, bool offlining, | 16 | unsigned long private, bool offlining, |
17 | enum migrate_mode mode); | 17 | enum migrate_mode mode); |
18 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, | 18 | extern int migrate_huge_page(struct page *, new_page_t x, |
19 | unsigned long private, bool offlining, | 19 | unsigned long private, bool offlining, |
20 | enum migrate_mode mode); | 20 | enum migrate_mode mode); |
21 | 21 | ||
@@ -36,7 +36,7 @@ static inline void putback_lru_pages(struct list_head *l) {} | |||
36 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 36 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
37 | unsigned long private, bool offlining, | 37 | unsigned long private, bool offlining, |
38 | enum migrate_mode mode) { return -ENOSYS; } | 38 | enum migrate_mode mode) { return -ENOSYS; } |
39 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, | 39 | static inline int migrate_huge_page(struct page *page, new_page_t x, |
40 | unsigned long private, bool offlining, | 40 | unsigned long private, bool offlining, |
41 | enum migrate_mode mode) { return -ENOSYS; } | 41 | enum migrate_mode mode) { return -ENOSYS; } |
42 | 42 | ||