linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] memcg: Fix test_memcg_min/low test failures
@ 2025-04-14  2:12 Waiman Long
  2025-04-14  2:12 ` [PATCH v6 1/2] mm/vmscan: Skip memcg with !usage in shrink_node_memcgs() Waiman Long
  2025-04-14  2:12 ` [PATCH v6 2/2] selftests: memcg: Increase error tolerance of child memory.current check in test_memcg_protection() Waiman Long
  0 siblings, 2 replies; 10+ messages in thread
From: Waiman Long @ 2025-04-14  2:12 UTC (permalink / raw)
  To: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt,
	Muchun Song, Andrew Morton, Tejun Heo, Michal Koutný,
	Shuah Khan
  Cc: linux-kernel, cgroups, linux-mm, linux-kselftest, Waiman Long

v6:
 - The memcg_test_low failure is indeed due to the memory_recursiveprot
   mount option which is enabled by default in systemd cgroup v2 setting.
   So adopt Michal's suggestion to adjust the low event checking
   according to whether memory_recursiveprot is enabled or not.

v5:
 - Use mem_cgroup_usage() in patch 1 as originally suggested by Johannes.

The test_memcontrol selftest consistently fails its test_memcg_low
sub-test (with memory_recursiveprot enabled) and sporadically fails
its test_memcg_min sub-test. This patchset fixes the test_memcg_min
and test_memcg_low failures by skipping the !usage case in
shrink_node_memcgs() and adjust the test_memcontrol selftest to fix
other causes of the test failures.

Waiman Long (2):
  mm/vmscan: Skip memcg with !usage in shrink_node_memcgs()
  selftests: memcg: Increase error tolerance of child memory.current
    check in test_memcg_protection()

 mm/internal.h                                 |  9 +++++++++
 mm/memcontrol-v1.h                            |  2 --
 mm/vmscan.c                                   |  4 ++++
 .../selftests/cgroup/test_memcontrol.c        | 20 ++++++++++++-------
 4 files changed, 26 insertions(+), 9 deletions(-)

-- 
2.48.1



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

end of thread, other threads:[~2025-04-14 18:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14  2:12 [PATCH v6 0/2] memcg: Fix test_memcg_min/low test failures Waiman Long
2025-04-14  2:12 ` [PATCH v6 1/2] mm/vmscan: Skip memcg with !usage in shrink_node_memcgs() Waiman Long
2025-04-14 12:42   ` Michal Koutný
2025-04-14 13:15     ` Waiman Long
2025-04-14 13:55       ` Michal Koutný
2025-04-14 16:47         ` Johannes Weiner
2025-04-14 18:01           ` Michal Koutný
2025-04-14 18:10             ` Johannes Weiner
2025-04-14 18:57               ` Waiman Long
2025-04-14  2:12 ` [PATCH v6 2/2] selftests: memcg: Increase error tolerance of child memory.current check in test_memcg_protection() Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).