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.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index de40f169a4e4..fcc169610d09 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -171,8 +171,8 @@ extern unsigned int nr_free_pagecache_pages(void);
171 171
172 172
173/* linux/mm/swap.c */ 173/* linux/mm/swap.c */
174extern void lru_cache_add(struct page *); 174extern void __lru_cache_add(struct page *, enum lru_list lru);
175extern void lru_cache_add_active(struct page *); 175extern void lru_cache_add_lru(struct page *, enum lru_list lru);
176extern void activate_page(struct page *); 176extern void activate_page(struct page *);
177extern void mark_page_accessed(struct page *); 177extern void mark_page_accessed(struct page *);
178extern void lru_add_drain(void); 178extern void lru_add_drain(void);
@@ -180,6 +180,20 @@ extern int lru_add_drain_all(void);
180extern void rotate_reclaimable_page(struct page *page); 180extern void rotate_reclaimable_page(struct page *page);
181extern void swap_setup(void); 181extern void swap_setup(void);
182 182
183/**
184 * lru_cache_add: add a page to the page lists
185 * @page: the page to add
186 */
187static inline void lru_cache_add(struct page *page)
188{
189 __lru_cache_add(page, LRU_INACTIVE);
190}
191
192static inline void lru_cache_add_active(struct page *page)
193{
194 __lru_cache_add(page, LRU_ACTIVE);
195}
196
183/* linux/mm/vmscan.c */ 197/* linux/mm/vmscan.c */
184extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, 198extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
185 gfp_t gfp_mask); 199 gfp_t gfp_mask);