Commit 664dc218 authored by Dmitry Rokosov's avatar Dmitry Rokosov Committed by Andrew Morton

mm: memcg: add reminder comment for the memcg v2 events

To maintain the correct state, it is important to ensure that events for
the memory cgroup v2 are aligned with the sample cgroup codes.

Link: https://lkml.kernel.org/r/20231123071945.25811-4-ddrokosov@salutedevices.comSigned-off-by: default avatarDmitry Rokosov <ddrokosov@salutedevices.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent becf6529
...@@ -6783,6 +6783,10 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, ...@@ -6783,6 +6783,10 @@ static ssize_t memory_max_write(struct kernfs_open_file *of,
return nbytes; return nbytes;
} }
/*
* Note: don't forget to update the 'samples/cgroup/memcg_event_listener'
* if any new events become available.
*/
static void __memory_events_show(struct seq_file *m, atomic_long_t *events) static void __memory_events_show(struct seq_file *m, atomic_long_t *events)
{ {
seq_printf(m, "low %lu\n", atomic_long_read(&events[MEMCG_LOW])); seq_printf(m, "low %lu\n", atomic_long_read(&events[MEMCG_LOW]));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment