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.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index f8f3907533f0..be938ce4895a 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -214,7 +214,7 @@ static inline void lru_cache_add_active_file(struct page *page)
214extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, 214extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
215 gfp_t gfp_mask); 215 gfp_t gfp_mask);
216extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, 216extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
217 gfp_t gfp_mask); 217 gfp_t gfp_mask, bool noswap);
218extern int __isolate_lru_page(struct page *page, int mode, int file); 218extern int __isolate_lru_page(struct page *page, int mode, int file);
219extern unsigned long shrink_all_memory(unsigned long nr_pages); 219extern unsigned long shrink_all_memory(unsigned long nr_pages);
220extern int vm_swappiness; 220extern int vm_swappiness;
@@ -336,7 +336,7 @@ static inline void disable_swap_token(void)
336#ifdef CONFIG_CGROUP_MEM_RES_CTLR 336#ifdef CONFIG_CGROUP_MEM_RES_CTLR
337extern int mem_cgroup_cache_charge_swapin(struct page *page, 337extern int mem_cgroup_cache_charge_swapin(struct page *page,
338 struct mm_struct *mm, gfp_t mask, bool locked); 338 struct mm_struct *mm, gfp_t mask, bool locked);
339extern void mem_cgroup_uncharge_swapcache(struct page *page); 339extern void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent);
340#else 340#else
341static inline 341static inline
342int mem_cgroup_cache_charge_swapin(struct page *page, 342int mem_cgroup_cache_charge_swapin(struct page *page,
@@ -344,7 +344,15 @@ int mem_cgroup_cache_charge_swapin(struct page *page,
344{ 344{
345 return 0; 345 return 0;
346} 346}
347static inline void mem_cgroup_uncharge_swapcache(struct page *page) 347static inline void
348mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)
349{
350}
351#endif
352#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
353extern void mem_cgroup_uncharge_swap(swp_entry_t ent);
354#else
355static inline void mem_cgroup_uncharge_swap(swp_entry_t ent)
348{ 356{
349} 357}
350#endif 358#endif