linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: introduce entrance for root_mem_cgroup's current
@ 2023-02-02  4:32 zhaoyang.huang
  2023-02-02  6:30 ` Shakeel Butt
  2023-02-02  8:27 ` Michal Hocko
  0 siblings, 2 replies; 8+ messages in thread
From: zhaoyang.huang @ 2023-02-02  4:32 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Peter Zijlstra, Michal Hocko,
	Roman Gushchin, Shakeel Butt, linux-mm, linux-kernel, cgroups,
	Zhaoyang Huang, ke.wang

From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>

Introducing memory.root_current for the memory charges on root_mem_cgroup.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
 mm/memcontrol.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index ab457f0..158d4232 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6681,6 +6681,11 @@ static ssize_t memory_reclaim(struct kernfs_open_file *of, char *buf,
 
 static struct cftype memory_files[] = {
 	{
+		.name = "root_current",
+		.flags = CFTYPE_ONLY_ON_ROOT,
+		.read_u64 = memory_current_read,
+	},
+	{
 		.name = "current",
 		.flags = CFTYPE_NOT_ON_ROOT,
 		.read_u64 = memory_current_read,
-- 
1.9.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-02-03 19:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02  4:32 [PATCH] mm: introduce entrance for root_mem_cgroup's current zhaoyang.huang
2023-02-02  6:30 ` Shakeel Butt
2023-02-02  6:36   ` Zhaoyang Huang
2023-02-02  8:27 ` Michal Hocko
2023-02-02 18:24   ` Shakeel Butt
2023-02-03  8:58     ` Michal Hocko
2023-02-03 19:18       ` Shakeel Butt
2023-02-03 17:42   ` Roman Gushchin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox