aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/swap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r--include/linux/swap.h12
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
13struct notifier_block;
14
15struct 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 */
158extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); 162extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
163extern int register_oom_notifier(struct notifier_block *nb);
164extern int unregister_oom_notifier(struct notifier_block *nb);
159 165
160/* linux/mm/memory.c */ 166/* linux/mm/memory.c */
161extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); 167extern 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 */
164extern unsigned long totalram_pages; 170extern unsigned long totalram_pages;
165extern unsigned long totalhigh_pages;
166extern unsigned long totalreserve_pages; 171extern unsigned long totalreserve_pages;
167extern long nr_swap_pages; 172extern long nr_swap_pages;
168extern unsigned int nr_free_pages(void); 173extern unsigned int nr_free_pages(void);
@@ -190,6 +195,7 @@ extern long vm_total_pages;
190#ifdef CONFIG_NUMA 195#ifdef CONFIG_NUMA
191extern int zone_reclaim_mode; 196extern int zone_reclaim_mode;
192extern int sysctl_min_unmapped_ratio; 197extern int sysctl_min_unmapped_ratio;
198extern int sysctl_min_slab_ratio;
193extern int zone_reclaim(struct zone *, gfp_t, unsigned int); 199extern 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 */
213extern int swap_readpage(struct file *, struct page *); 219extern int swap_readpage(struct file *, struct page *);
214extern int swap_writepage(struct page *page, struct writeback_control *wbc); 220extern int swap_writepage(struct page *page, struct writeback_control *wbc);
215extern int rw_swap_page_sync(int, swp_entry_t, struct page *); 221extern int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page,
222 struct bio **bio_chain);
223extern 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 */
218extern struct address_space swapper_space; 226extern struct address_space swapper_space;