Commit | Line | Data |
---|---|---|
52d4b9ac KH |
1 | #ifndef __LINUX_PAGE_CGROUP_H |
2 | #define __LINUX_PAGE_CGROUP_H | |
3 | ||
27a7faa0 | 4 | #include <linux/swap.h> |
97572751 | 5 | |
c255a458 | 6 | #ifdef CONFIG_MEMCG_SWAP |
02491447 DN |
7 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, |
8 | unsigned short old, unsigned short new); | |
a3b2d692 | 9 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
9fb4b7cc | 10 | extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent); |
27a7faa0 KH |
11 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); |
12 | extern void swap_cgroup_swapoff(int type); | |
13 | #else | |
27a7faa0 KH |
14 | |
15 | static inline | |
a3b2d692 | 16 | unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id) |
27a7faa0 | 17 | { |
a3b2d692 | 18 | return 0; |
27a7faa0 KH |
19 | } |
20 | ||
21 | static inline | |
9fb4b7cc | 22 | unsigned short lookup_swap_cgroup_id(swp_entry_t ent) |
27a7faa0 | 23 | { |
a3b2d692 | 24 | return 0; |
27a7faa0 KH |
25 | } |
26 | ||
27 | static inline int | |
28 | swap_cgroup_swapon(int type, unsigned long max_pages) | |
29 | { | |
30 | return 0; | |
31 | } | |
32 | ||
33 | static inline void swap_cgroup_swapoff(int type) | |
34 | { | |
35 | return; | |
36 | } | |
37 | ||
c255a458 | 38 | #endif /* CONFIG_MEMCG_SWAP */ |
6b3ae58e | 39 | |
6b3ae58e | 40 | #endif /* __LINUX_PAGE_CGROUP_H */ |