diff options
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 27 |
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, | |||
239 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | 239 | extern 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); |
242 | extern 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); | ||
242 | extern int __isolate_lru_page(struct page *page, int mode, int file); | 247 | extern int __isolate_lru_page(struct page *page, int mode, int file); |
243 | extern unsigned long shrink_all_memory(unsigned long nr_pages); | 248 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
244 | extern int vm_swappiness; | 249 | extern int vm_swappiness; |
@@ -262,7 +267,7 @@ extern int page_evictable(struct page *page, struct vm_area_struct *vma); | |||
262 | extern void scan_mapping_unevictable_pages(struct address_space *); | 267 | extern void scan_mapping_unevictable_pages(struct address_space *); |
263 | 268 | ||
264 | extern unsigned long scan_unevictable_pages; | 269 | extern unsigned long scan_unevictable_pages; |
265 | extern int scan_unevictable_handler(struct ctl_table *, int, struct file *, | 270 | extern int scan_unevictable_handler(struct ctl_table *, int, |
266 | void __user *, size_t *, loff_t *); | 271 | void __user *, size_t *, loff_t *); |
267 | extern int scan_unevictable_register_node(struct node *node); | 272 | extern int scan_unevictable_register_node(struct node *node); |
268 | extern void scan_unevictable_unregister_node(struct node *node); | 273 | extern 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) | 449 | static 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 | |
453 | static inline void grab_swap_token(struct mm_struct *mm) | ||
454 | { | ||
455 | } | ||
456 | |||
457 | static inline int has_swap_token(struct mm_struct *mm) | ||
458 | { | ||
459 | return 0; | ||
460 | } | ||
461 | |||
462 | static inline void disable_swap_token(void) | ||
463 | { | ||
464 | } | ||
448 | 465 | ||
449 | static inline void | 466 | static inline void |
450 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 467 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) |