diff options
Diffstat (limited to 'include/linux/page_cgroup.h')
-rw-r--r-- | include/linux/page_cgroup.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index b0e4eb12623..aef22ae2af4 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -39,6 +39,7 @@ enum { | |||
39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
41 | PCG_ACCT_LRU, /* page has been accounted for */ | 41 | PCG_ACCT_LRU, /* page has been accounted for */ |
42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
42 | }; | 43 | }; |
43 | 44 | ||
44 | #define TESTPCGFLAG(uname, lname) \ | 45 | #define TESTPCGFLAG(uname, lname) \ |
@@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU) | |||
73 | TESTPCGFLAG(AcctLRU, ACCT_LRU) | 74 | TESTPCGFLAG(AcctLRU, ACCT_LRU) |
74 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) | 75 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) |
75 | 76 | ||
77 | |||
78 | SETPCGFLAG(FileMapped, FILE_MAPPED) | ||
79 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) | ||
80 | TESTPCGFLAG(FileMapped, FILE_MAPPED) | ||
81 | |||
76 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 82 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
77 | { | 83 | { |
78 | return page_to_nid(pc->page); | 84 | return page_to_nid(pc->page); |
@@ -118,6 +124,8 @@ static inline void __init page_cgroup_init_flatmem(void) | |||
118 | #include <linux/swap.h> | 124 | #include <linux/swap.h> |
119 | 125 | ||
120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 126 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
127 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | ||
128 | unsigned short old, unsigned short new); | ||
121 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); | 129 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
122 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); | 130 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); |
123 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); | 131 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); |