diff options
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 508668f840b6..4a99e4a7fbf3 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -167,15 +167,38 @@ extern void FASTCALL(lru_cache_add_active(struct page *)); | |||
167 | extern void FASTCALL(activate_page(struct page *)); | 167 | extern void FASTCALL(activate_page(struct page *)); |
168 | extern void FASTCALL(mark_page_accessed(struct page *)); | 168 | extern void FASTCALL(mark_page_accessed(struct page *)); |
169 | extern void lru_add_drain(void); | 169 | extern void lru_add_drain(void); |
170 | extern int lru_add_drain_all(void); | ||
170 | extern int rotate_reclaimable_page(struct page *page); | 171 | extern int rotate_reclaimable_page(struct page *page); |
171 | extern void swap_setup(void); | 172 | extern void swap_setup(void); |
172 | 173 | ||
173 | /* linux/mm/vmscan.c */ | 174 | /* linux/mm/vmscan.c */ |
174 | extern int try_to_free_pages(struct zone **, gfp_t); | 175 | extern int try_to_free_pages(struct zone **, gfp_t); |
175 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); | ||
176 | extern int shrink_all_memory(int); | 176 | extern int shrink_all_memory(int); |
177 | extern int vm_swappiness; | 177 | extern int vm_swappiness; |
178 | 178 | ||
179 | #ifdef CONFIG_NUMA | ||
180 | extern int zone_reclaim_mode; | ||
181 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); | ||
182 | #else | ||
183 | #define zone_reclaim_mode 0 | ||
184 | static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | ||
185 | { | ||
186 | return 0; | ||
187 | } | ||
188 | #endif | ||
189 | |||
190 | #ifdef CONFIG_MIGRATION | ||
191 | extern int isolate_lru_page(struct page *p); | ||
192 | extern int putback_lru_pages(struct list_head *l); | ||
193 | extern int migrate_pages(struct list_head *l, struct list_head *t, | ||
194 | struct list_head *moved, struct list_head *failed); | ||
195 | #else | ||
196 | static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } | ||
197 | static inline int putback_lru_pages(struct list_head *l) { return 0; } | ||
198 | static inline int migrate_pages(struct list_head *l, struct list_head *t, | ||
199 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } | ||
200 | #endif | ||
201 | |||
179 | #ifdef CONFIG_MMU | 202 | #ifdef CONFIG_MMU |
180 | /* linux/mm/shmem.c */ | 203 | /* linux/mm/shmem.c */ |
181 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 204 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
@@ -193,7 +216,7 @@ extern int rw_swap_page_sync(int, swp_entry_t, struct page *); | |||
193 | extern struct address_space swapper_space; | 216 | extern struct address_space swapper_space; |
194 | #define total_swapcache_pages swapper_space.nrpages | 217 | #define total_swapcache_pages swapper_space.nrpages |
195 | extern void show_swap_cache_info(void); | 218 | extern void show_swap_cache_info(void); |
196 | extern int add_to_swap(struct page *); | 219 | extern int add_to_swap(struct page *, gfp_t); |
197 | extern void __delete_from_swap_cache(struct page *); | 220 | extern void __delete_from_swap_cache(struct page *); |
198 | extern void delete_from_swap_cache(struct page *); | 221 | extern void delete_from_swap_cache(struct page *); |
199 | extern int move_to_swap_cache(struct page *, swp_entry_t); | 222 | extern int move_to_swap_cache(struct page *, swp_entry_t); |
@@ -210,6 +233,7 @@ extern unsigned int nr_swapfiles; | |||
210 | extern struct swap_info_struct swap_info[]; | 233 | extern struct swap_info_struct swap_info[]; |
211 | extern void si_swapinfo(struct sysinfo *); | 234 | extern void si_swapinfo(struct sysinfo *); |
212 | extern swp_entry_t get_swap_page(void); | 235 | extern swp_entry_t get_swap_page(void); |
236 | extern swp_entry_t get_swap_page_of_type(int type); | ||
213 | extern int swap_duplicate(swp_entry_t); | 237 | extern int swap_duplicate(swp_entry_t); |
214 | extern int valid_swaphandles(swp_entry_t, unsigned long *); | 238 | extern int valid_swaphandles(swp_entry_t, unsigned long *); |
215 | extern void swap_free(swp_entry_t); | 239 | extern void swap_free(swp_entry_t); |