diff options
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index b83cf61403ed..350711560753 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -264,6 +264,37 @@ struct swap_list_t { | |||
264 | void *workingset_eviction(struct address_space *mapping, struct page *page); | 264 | void *workingset_eviction(struct address_space *mapping, struct page *page); |
265 | bool workingset_refault(void *shadow); | 265 | bool workingset_refault(void *shadow); |
266 | void workingset_activation(struct page *page); | 266 | void workingset_activation(struct page *page); |
267 | extern struct list_lru workingset_shadow_nodes; | ||
268 | |||
269 | static inline unsigned int workingset_node_pages(struct radix_tree_node *node) | ||
270 | { | ||
271 | return node->count & RADIX_TREE_COUNT_MASK; | ||
272 | } | ||
273 | |||
274 | static inline void workingset_node_pages_inc(struct radix_tree_node *node) | ||
275 | { | ||
276 | node->count++; | ||
277 | } | ||
278 | |||
279 | static inline void workingset_node_pages_dec(struct radix_tree_node *node) | ||
280 | { | ||
281 | node->count--; | ||
282 | } | ||
283 | |||
284 | static inline unsigned int workingset_node_shadows(struct radix_tree_node *node) | ||
285 | { | ||
286 | return node->count >> RADIX_TREE_COUNT_SHIFT; | ||
287 | } | ||
288 | |||
289 | static inline void workingset_node_shadows_inc(struct radix_tree_node *node) | ||
290 | { | ||
291 | node->count += 1U << RADIX_TREE_COUNT_SHIFT; | ||
292 | } | ||
293 | |||
294 | static inline void workingset_node_shadows_dec(struct radix_tree_node *node) | ||
295 | { | ||
296 | node->count -= 1U << RADIX_TREE_COUNT_SHIFT; | ||
297 | } | ||
267 | 298 | ||
268 | /* linux/mm/page_alloc.c */ | 299 | /* linux/mm/page_alloc.c */ |
269 | extern unsigned long totalram_pages; | 300 | extern unsigned long totalram_pages; |