20 #ifndef _LINUX_MEMCONTROL_H
21 #define _LINUX_MEMCONTROL_H
105 struct page *oldpage,
struct page *newpage,
bool migration_ok);
123 struct page *newpage);
125 #ifdef CONFIG_MEMCG_SWAP
129 static inline bool mem_cgroup_disabled(
void)
137 unsigned long *
flags);
141 static inline void mem_cgroup_begin_update_page_stat(
struct page *
page,
144 if (mem_cgroup_disabled())
153 unsigned long *flags);
154 static inline void mem_cgroup_end_update_page_stat(
struct page *page,
155 bool *locked,
unsigned long *flags)
157 if (mem_cgroup_disabled())
168 static inline void mem_cgroup_inc_page_stat(
struct page *page,
174 static inline void mem_cgroup_dec_page_stat(
struct page *page,
182 unsigned long *total_scanned);
185 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
186 void mem_cgroup_split_huge_fixup(
struct page *
head);
189 #ifdef CONFIG_DEBUG_VM
190 bool mem_cgroup_bad_page_check(
struct page *page);
191 void mem_cgroup_print_bad_page(
struct page *page);
261 static inline bool mm_match_cgroup(
struct mm_struct *mm,
273 static inline struct cgroup_subsys_state
286 struct page *oldpage,
struct page *newpage,
bool migration_ok)
303 static inline bool mem_cgroup_disabled(
void)
320 static inline unsigned long
337 static inline void mem_cgroup_begin_update_page_stat(
struct page *page,
338 bool *locked,
unsigned long *flags)
342 static inline void mem_cgroup_end_update_page_stat(
struct page *page,
343 bool *locked,
unsigned long *flags)
347 static inline void mem_cgroup_inc_page_stat(
struct page *page,
352 static inline void mem_cgroup_dec_page_stat(
struct page *page,
360 unsigned long *total_scanned)
365 static inline void mem_cgroup_split_huge_fixup(
struct page *
head)
374 struct page *newpage)
379 #if !defined(CONFIG_MEMCG) || !defined(CONFIG_DEBUG_VM)
381 mem_cgroup_bad_page_check(
struct page *page)
387 mem_cgroup_print_bad_page(
struct page *page)
399 #if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)
400 void sock_update_memcg(
struct sock *
sk);
401 void sock_release_memcg(
struct sock *
sk);
403 static inline void sock_update_memcg(
struct sock *
sk)
406 static inline void sock_release_memcg(
struct sock *
sk)