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.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index f077e454c659..4ec90019c1a4 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -239,6 +239,11 @@ extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
239extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, 239extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
240 gfp_t gfp_mask, bool noswap, 240 gfp_t gfp_mask, bool noswap,
241 unsigned int swappiness); 241 unsigned int swappiness);
242extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
243 gfp_t gfp_mask, bool noswap,
244 unsigned int swappiness,
245 struct zone *zone,
246 int nid);
242extern int __isolate_lru_page(struct page *page, int mode, int file); 247extern int __isolate_lru_page(struct page *page, int mode, int file);
243extern unsigned long shrink_all_memory(unsigned long nr_pages); 248extern unsigned long shrink_all_memory(unsigned long nr_pages);
244extern int vm_swappiness; 249extern int vm_swappiness;
@@ -262,7 +267,7 @@ extern int page_evictable(struct page *page, struct vm_area_struct *vma);
262extern void scan_mapping_unevictable_pages(struct address_space *); 267extern void scan_mapping_unevictable_pages(struct address_space *);
263 268
264extern unsigned long scan_unevictable_pages; 269extern unsigned long scan_unevictable_pages;
265extern int scan_unevictable_handler(struct ctl_table *, int, struct file *, 270extern int scan_unevictable_handler(struct ctl_table *, int,
266 void __user *, size_t *, loff_t *); 271 void __user *, size_t *, loff_t *);
267extern int scan_unevictable_register_node(struct node *node); 272extern int scan_unevictable_register_node(struct node *node);
268extern void scan_unevictable_unregister_node(struct node *node); 273extern void scan_unevictable_unregister_node(struct node *node);
@@ -441,10 +446,22 @@ static inline swp_entry_t get_swap_page(void)
441} 446}
442 447
443/* linux/mm/thrash.c */ 448/* linux/mm/thrash.c */
444#define put_swap_token(mm) do { } while (0) 449static inline void put_swap_token(struct mm_struct *mm)
445#define grab_swap_token(mm) do { } while (0) 450{
446#define has_swap_token(mm) 0 451}
447#define disable_swap_token() do { } while (0) 452
453static inline void grab_swap_token(struct mm_struct *mm)
454{
455}
456
457static inline int has_swap_token(struct mm_struct *mm)
458{
459 return 0;
460}
461
462static inline void disable_swap_token(void)
463{
464}
448 465
449static inline void 466static inline void
450mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) 467mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)