diff options
author | Dmitry Rokosov <ddrokosov@salutedevices.com> | 2023-11-23 08:19:45 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-11 01:51:55 +0100 |
commit | 664dc2189dd4327dd94959f5167a263276af6b76 (patch) | |
tree | 6283f838abfbbd26419d51e0ea98a89d2597f399 /mm/memcontrol.c | |
parent | samples/cgroup: introduce memcg memory.events listener (diff) | |
download | linux-664dc2189dd4327dd94959f5167a263276af6b76.tar.xz linux-664dc2189dd4327dd94959f5167a263276af6b76.zip |
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.com
Signed-off-by: Dmitry 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: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b226090fd906..592572d4842e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6783,6 +6783,10 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, 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) { seq_printf(m, "low %lu\n", atomic_long_read(&events[MEMCG_LOW])); |