1 #ifndef _LINUX_MIGRATE_H
2 #define _LINUX_MIGRATE_H
5 #include <linux/mempolicy.h>
7 typedef struct page
*new_page_t(struct page
*, unsigned long private, int **);
10 * MIGRATE_ASYNC means never block
11 * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking
12 * on most operations but not ->writepage as the potential stall time
14 * MIGRATE_SYNC will block when migrating pages
22 #ifdef CONFIG_MIGRATION
23 #define PAGE_MIGRATION 1
25 extern void putback_lru_pages(struct list_head
*l
);
26 extern int migrate_page(struct address_space
*,
27 struct page
*, struct page
*, enum migrate_mode
);
28 extern int migrate_pages(struct list_head
*l
, new_page_t x
,
29 unsigned long private, bool offlining
,
30 enum migrate_mode mode
);
31 extern int migrate_huge_pages(struct list_head
*l
, new_page_t x
,
32 unsigned long private, bool offlining
,
33 enum migrate_mode mode
);
35 extern int fail_migrate_page(struct address_space
*,
36 struct page
*, struct page
*);
38 extern int migrate_prep(void);
39 extern int migrate_prep_local(void);
40 extern int migrate_vmas(struct mm_struct
*mm
,
41 const nodemask_t
*from
, const nodemask_t
*to
,
43 extern void migrate_page_copy(struct page
*newpage
, struct page
*page
);
44 extern int migrate_huge_page_move_mapping(struct address_space
*mapping
,
45 struct page
*newpage
, struct page
*page
);
47 #define PAGE_MIGRATION 0
49 static inline void putback_lru_pages(struct list_head
*l
) {}
50 static inline int migrate_pages(struct list_head
*l
, new_page_t x
,
51 unsigned long private, bool offlining
,
52 enum migrate_mode mode
) { return -ENOSYS
; }
53 static inline int migrate_huge_pages(struct list_head
*l
, new_page_t x
,
54 unsigned long private, bool offlining
,
55 enum migrate_mode mode
) { return -ENOSYS
; }
57 static inline int migrate_prep(void) { return -ENOSYS
; }
58 static inline int migrate_prep_local(void) { return -ENOSYS
; }
60 static inline int migrate_vmas(struct mm_struct
*mm
,
61 const nodemask_t
*from
, const nodemask_t
*to
,
67 static inline void migrate_page_copy(struct page
*newpage
,
70 static inline int migrate_huge_page_move_mapping(struct address_space
*mapping
,
71 struct page
*newpage
, struct page
*page
)
76 /* Possible settings for the migrate_page() method in address_operations */
77 #define migrate_page NULL
78 #define fail_migrate_page NULL
80 #endif /* CONFIG_MIGRATION */
81 #endif /* _LINUX_MIGRATE_H */
This page took 0.041079 seconds and 6 git commands to generate.