Blame view

include/linux/migrate.h 2.16 KB
b20a35035   Christoph Lameter   [PATCH] page migr...
1
2
  #ifndef _LINUX_MIGRATE_H
  #define _LINUX_MIGRATE_H
b20a35035   Christoph Lameter   [PATCH] page migr...
3
  #include <linux/mm.h>
906e0be19   Christoph Lameter   page migration: O...
4
  #include <linux/mempolicy.h>
6536e3123   Andrew Morton   mm: fix warnings ...
5
  #include <linux/migrate_mode.h>
b20a35035   Christoph Lameter   [PATCH] page migr...
6

742755a1d   Christoph Lameter   [PATCH] page migr...
7
  typedef struct page *new_page_t(struct page *, unsigned long private, int **);
95a402c38   Christoph Lameter   [PATCH] page migr...
8

906e0be19   Christoph Lameter   page migration: O...
9
  #ifdef CONFIG_MIGRATION
64cdd548f   KOSAKI Motohiro   mm: cleanup: remo...
10

e13861d82   Minchan Kim   mm: remove return...
11
  extern void putback_lru_pages(struct list_head *l);
2d1db3b11   Christoph Lameter   [PATCH] page migr...
12
  extern int migrate_page(struct address_space *,
a6bc32b89   Mel Gorman   mm: compaction: i...
13
  			struct page *, struct page *, enum migrate_mode);
62b61f611   Hugh Dickins   ksm: memory hotre...
14
  extern int migrate_pages(struct list_head *l, new_page_t x,
7f0f24967   Mel Gorman   mm: migration: cl...
15
  			unsigned long private, bool offlining,
a6bc32b89   Mel Gorman   mm: compaction: i...
16
  			enum migrate_mode mode);
290408d4a   Naoya Horiguchi   hugetlb: hugepage...
17
  extern int migrate_huge_pages(struct list_head *l, new_page_t x,
7f0f24967   Mel Gorman   mm: migration: cl...
18
  			unsigned long private, bool offlining,
a6bc32b89   Mel Gorman   mm: compaction: i...
19
  			enum migrate_mode mode);
95a402c38   Christoph Lameter   [PATCH] page migr...
20

2d1db3b11   Christoph Lameter   [PATCH] page migr...
21
22
  extern int fail_migrate_page(struct address_space *,
  			struct page *, struct page *);
b20a35035   Christoph Lameter   [PATCH] page migr...
23
24
  
  extern int migrate_prep(void);
748446bb6   Mel Gorman   mm: compaction: m...
25
  extern int migrate_prep_local(void);
7b2259b3e   Christoph Lameter   [PATCH] page migr...
26
27
28
  extern int migrate_vmas(struct mm_struct *mm,
  		const nodemask_t *from, const nodemask_t *to,
  		unsigned long flags);
290408d4a   Naoya Horiguchi   hugetlb: hugepage...
29
30
31
  extern void migrate_page_copy(struct page *newpage, struct page *page);
  extern int migrate_huge_page_move_mapping(struct address_space *mapping,
  				  struct page *newpage, struct page *page);
b20a35035   Christoph Lameter   [PATCH] page migr...
32
  #else
64cdd548f   KOSAKI Motohiro   mm: cleanup: remo...
33

e13861d82   Minchan Kim   mm: remove return...
34
  static inline void putback_lru_pages(struct list_head *l) {}
95a402c38   Christoph Lameter   [PATCH] page migr...
35
  static inline int migrate_pages(struct list_head *l, new_page_t x,
7f0f24967   Mel Gorman   mm: migration: cl...
36
  		unsigned long private, bool offlining,
a6bc32b89   Mel Gorman   mm: compaction: i...
37
  		enum migrate_mode mode) { return -ENOSYS; }
290408d4a   Naoya Horiguchi   hugetlb: hugepage...
38
  static inline int migrate_huge_pages(struct list_head *l, new_page_t x,
7f0f24967   Mel Gorman   mm: migration: cl...
39
  		unsigned long private, bool offlining,
a6bc32b89   Mel Gorman   mm: compaction: i...
40
  		enum migrate_mode mode) { return -ENOSYS; }
9bf9e89c3   Christoph Lameter   [PATCH] migrate_p...
41

b20a35035   Christoph Lameter   [PATCH] page migr...
42
  static inline int migrate_prep(void) { return -ENOSYS; }
748446bb6   Mel Gorman   mm: compaction: m...
43
  static inline int migrate_prep_local(void) { return -ENOSYS; }
b20a35035   Christoph Lameter   [PATCH] page migr...
44

7b2259b3e   Christoph Lameter   [PATCH] page migr...
45
46
47
48
49
50
  static inline int migrate_vmas(struct mm_struct *mm,
  		const nodemask_t *from, const nodemask_t *to,
  		unsigned long flags)
  {
  	return -ENOSYS;
  }
290408d4a   Naoya Horiguchi   hugetlb: hugepage...
51
52
  static inline void migrate_page_copy(struct page *newpage,
  				     struct page *page) {}
6f39ce056   Naoya Horiguchi   Fix build error w...
53
  static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
290408d4a   Naoya Horiguchi   hugetlb: hugepage...
54
55
56
57
  				  struct page *newpage, struct page *page)
  {
  	return -ENOSYS;
  }
b20a35035   Christoph Lameter   [PATCH] page migr...
58
59
60
61
62
63
  /* Possible settings for the migrate_page() method in address_operations */
  #define migrate_page NULL
  #define fail_migrate_page NULL
  
  #endif /* CONFIG_MIGRATION */
  #endif /* _LINUX_MIGRATE_H */