diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2015-02-11 18:25:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:06:00 -0500 |
commit | 6de226191d12fce30331ebf024ca3ed24834f0ee (patch) | |
tree | 74d4910406255087f3e72c0e4d483513d8449ad4 /include/linux/memcontrol.h | |
parent | 93aa7d95248d04b934eb8e89717c7b8d6400bf2b (diff) |
mm: memcontrol: track move_lock state internally
The complexity of memcg page stat synchronization is currently leaking
into the callsites, forcing them to keep track of the move_lock state and
the IRQ flags. Simplify the API by tracking it in the memcg.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index fb212e1d700d..76b4084b8d08 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -138,12 +138,10 @@ static inline bool mem_cgroup_disabled(void) | |||
138 | return false; | 138 | return false; |
139 | } | 139 | } |
140 | 140 | ||
141 | struct mem_cgroup *mem_cgroup_begin_page_stat(struct page *page, bool *locked, | 141 | struct mem_cgroup *mem_cgroup_begin_page_stat(struct page *page); |
142 | unsigned long *flags); | ||
143 | void mem_cgroup_end_page_stat(struct mem_cgroup *memcg, bool *locked, | ||
144 | unsigned long *flags); | ||
145 | void mem_cgroup_update_page_stat(struct mem_cgroup *memcg, | 142 | void mem_cgroup_update_page_stat(struct mem_cgroup *memcg, |
146 | enum mem_cgroup_stat_index idx, int val); | 143 | enum mem_cgroup_stat_index idx, int val); |
144 | void mem_cgroup_end_page_stat(struct mem_cgroup *memcg); | ||
147 | 145 | ||
148 | static inline void mem_cgroup_inc_page_stat(struct mem_cgroup *memcg, | 146 | static inline void mem_cgroup_inc_page_stat(struct mem_cgroup *memcg, |
149 | enum mem_cgroup_stat_index idx) | 147 | enum mem_cgroup_stat_index idx) |
@@ -285,14 +283,12 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) | |||
285 | { | 283 | { |
286 | } | 284 | } |
287 | 285 | ||
288 | static inline struct mem_cgroup *mem_cgroup_begin_page_stat(struct page *page, | 286 | static inline struct mem_cgroup *mem_cgroup_begin_page_stat(struct page *page) |
289 | bool *locked, unsigned long *flags) | ||
290 | { | 287 | { |
291 | return NULL; | 288 | return NULL; |
292 | } | 289 | } |
293 | 290 | ||
294 | static inline void mem_cgroup_end_page_stat(struct mem_cgroup *memcg, | 291 | static inline void mem_cgroup_end_page_stat(struct mem_cgroup *memcg) |
295 | bool *locked, unsigned long *flags) | ||
296 | { | 292 | { |
297 | } | 293 | } |
298 | 294 | ||