diff options
Diffstat (limited to 'include/linux/swap.h')
| -rw-r--r-- | include/linux/swap.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 5e59184c9096..e7c36ba2a2db 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -10,6 +10,10 @@ | |||
| 10 | #include <asm/atomic.h> | 10 | #include <asm/atomic.h> |
| 11 | #include <asm/page.h> | 11 | #include <asm/page.h> |
| 12 | 12 | ||
| 13 | struct notifier_block; | ||
| 14 | |||
| 15 | struct bio; | ||
| 16 | |||
| 13 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ | 17 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ |
| 14 | #define SWAP_FLAG_PRIO_MASK 0x7fff | 18 | #define SWAP_FLAG_PRIO_MASK 0x7fff |
| 15 | #define SWAP_FLAG_PRIO_SHIFT 0 | 19 | #define SWAP_FLAG_PRIO_SHIFT 0 |
| @@ -156,13 +160,14 @@ struct swap_list_t { | |||
| 156 | 160 | ||
| 157 | /* linux/mm/oom_kill.c */ | 161 | /* linux/mm/oom_kill.c */ |
| 158 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); | 162 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); |
| 163 | extern int register_oom_notifier(struct notifier_block *nb); | ||
| 164 | extern int unregister_oom_notifier(struct notifier_block *nb); | ||
| 159 | 165 | ||
| 160 | /* linux/mm/memory.c */ | 166 | /* linux/mm/memory.c */ |
| 161 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); | 167 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); |
| 162 | 168 | ||
| 163 | /* linux/mm/page_alloc.c */ | 169 | /* linux/mm/page_alloc.c */ |
| 164 | extern unsigned long totalram_pages; | 170 | extern unsigned long totalram_pages; |
| 165 | extern unsigned long totalhigh_pages; | ||
| 166 | extern unsigned long totalreserve_pages; | 171 | extern unsigned long totalreserve_pages; |
| 167 | extern long nr_swap_pages; | 172 | extern long nr_swap_pages; |
| 168 | extern unsigned int nr_free_pages(void); | 173 | extern unsigned int nr_free_pages(void); |
| @@ -190,6 +195,7 @@ extern long vm_total_pages; | |||
| 190 | #ifdef CONFIG_NUMA | 195 | #ifdef CONFIG_NUMA |
| 191 | extern int zone_reclaim_mode; | 196 | extern int zone_reclaim_mode; |
| 192 | extern int sysctl_min_unmapped_ratio; | 197 | extern int sysctl_min_unmapped_ratio; |
| 198 | extern int sysctl_min_slab_ratio; | ||
| 193 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); | 199 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); |
| 194 | #else | 200 | #else |
| 195 | #define zone_reclaim_mode 0 | 201 | #define zone_reclaim_mode 0 |
| @@ -212,7 +218,9 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); | |||
| 212 | /* linux/mm/page_io.c */ | 218 | /* linux/mm/page_io.c */ |
| 213 | extern int swap_readpage(struct file *, struct page *); | 219 | extern int swap_readpage(struct file *, struct page *); |
| 214 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 220 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
| 215 | extern int rw_swap_page_sync(int, swp_entry_t, struct page *); | 221 | extern int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page, |
| 222 | struct bio **bio_chain); | ||
| 223 | extern int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err); | ||
| 216 | 224 | ||
| 217 | /* linux/mm/swap_state.c */ | 225 | /* linux/mm/swap_state.c */ |
| 218 | extern struct address_space swapper_space; | 226 | extern struct address_space swapper_space; |
