physical memory, 2MB is charged(kmemcg is enabled and __GFP_ACCOUNT is
set). When make_alloc_exact free the unused 1MB and free_pages_exact
free the applied 1MB, actually, only 4KB(one page) is uncharged.
Therefore, the memcg of the tail page needs to be set when split page.
Signed-off-by: Zhou Guanghui
: Zhou Guanghui
---
include/linux/memcontrol.h | 6 ++
mm/huge_memory.c | 2 +-
mm/memcontrol.c| 15 ++-
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index e6dc793d587d..0c04d39a7967
v2:
1. rename mem_cgroup_split_huge_fixup
2. use split_page_memcg when split page
*** BLURB HERE ***
Zhou Guanghui (2):
mm/memcg: rename mem_cgroup_split_huge_fixup to split_page_memcg
mm/memcg: set memcg when split pages
include/linux/memcontrol.h | 6 ++
mm/huge_memory.c
emory cgroup info to tail pages
is needed when split page.
Signed-off-by: Zhou Guanghui
---
include/linux/memcontrol.h | 10 ++
mm/page_alloc.c| 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
4 matches
Mail list logo