mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
memcg: make memcg's file mapped consistent with global VM
In global VM, FILE_MAPPED is used but memcg uses MAPPED_FILE. This makes grep difficult. Replace memcg's MAPPED_FILE with FILE_MAPPED And in global VM, mapped shared memory is accounted into FILE_MAPPED. But memcg doesn't. fix it. Note: page_is_file_cache() just checks SwapBacked or not. So, we need to check PageAnon. Cc: Balbir Singh <balbir@in.ibm.com> Reviewed-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
cdec2e4265
commit
d8046582d5
3 changed files with 13 additions and 16 deletions
|
|
@ -122,7 +122,7 @@ static inline bool mem_cgroup_disabled(void)
|
|||
}
|
||||
|
||||
extern bool mem_cgroup_oom_called(struct task_struct *task);
|
||||
void mem_cgroup_update_mapped_file_stat(struct page *page, int val);
|
||||
void mem_cgroup_update_file_mapped(struct page *page, int val);
|
||||
unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
|
||||
gfp_t gfp_mask, int nid,
|
||||
int zid);
|
||||
|
|
@ -287,7 +287,7 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
|
|||
{
|
||||
}
|
||||
|
||||
static inline void mem_cgroup_update_mapped_file_stat(struct page *page,
|
||||
static inline void mem_cgroup_update_file_mapped(struct page *page,
|
||||
int val)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue