]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - mm/memcontrol.c
memcg: warn for unexpected events and stats
authorShakeel Butt <shakeel.butt@linux.dev>
Wed, 1 May 2024 17:26:16 +0000 (10:26 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 7 May 2024 17:37:00 +0000 (10:37 -0700)
commitacb5fe2f1aff090ff3d32328f3028c9fb72453ec
treec59343ccb98104bd679863c780c4ea8ba0e1933e
parent4715c6a753dccd15fd3a8928168f57e349205bd4
memcg: warn for unexpected events and stats

To reduce memory usage by the memcg events and stats, the kernel uses
indirection table and only allocate stats and events which are being used
by the memcg code.  To make this more robust, let's add warnings where
unexpected stats and events indexes are used.

Link: https://lkml.kernel.org/r/20240501172617.678560-8-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: T.J. Mercier <tjmercier@google.com>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c