All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/2] memcg/memcontrol0[34]: Align with the kselftest protection model
@ 2026-09-26 20:44 Sebastian Chlad
  2026-09-26 20:44 ` [LTP] [PATCH 1/2] memcg/memcontrol0[34]: Use expected values from the " Sebastian Chlad
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sebastian Chlad @ 2026-09-26 20:44 UTC (permalink / raw)
  To: ltp; +Cc: Sebastian Chlad

From: Sebastian Chlad <sebastian.chlad@suse.com>

memcontrol03 (memory.min) and memcontrol04 (memory.low) were ported
from the kselftest test_memcontrol.c in 2022, but they still follow the
2018 version of it. The kselftest has since reworked this exact test
three times, and none of that reached LTP:

- f10b6e9a8e66 ("selftests: memcg: adjust expected reclaim values of
  protected cgroups") replaced the hand-picked A/B/C ~= 33M and
  A/B/D ~= 17M with values from a simulation of the kernel's protection
  distribution (memcg_protection.m): 29M and 21M.
- 6a35919005d4 ("selftests: memcg: remove protection from top level
  memcg") dropped memory.min/memory.low on A, which has no effect since
  A is the reclaim root.
- d2def68ae06a ("selftests: memcg: increase error tolerance of child
  memory.current check in test_memcg_protection()") widened the
  tolerances to 15% (C) and 20% (D) because of sporadic failures.

The first one is what matters here. Kernels behave as the model says,
so D ends up close to 21M and sits right at the edge of the old
17M +/- 20% range. On x86_64 D was at ~90% of the upper limit in every
run, and small variations in reclaim are enough to fail it. With the
model values both C and D sit in the middle of their ranges (~8M of
margin each, 50+ iterations per test). LTP's tolerance is
already 20% for both, so the third commit needs no change.

Patch 1 updates the expected values, patch 2 removes the top level
protection. Both apply to memcontrol03 and memcontrol04.

This does not make every failure go away. On ppc64le we also see runs
where the most protected group C is reclaimed down to a few MB while the
unprotected A/B/F keeps its pagecache. That is protection working the
wrong way round, not a tolerance problem, and the tests should keep
reporting it.

Sebastian Chlad (2):
  memcg/memcontrol0[34]: Use expected values from the protection model
  memcg/memcontrol0[34]: Remove protection from the top level group

 .../kernel/controllers/memcg/memcontrol03.c    | 18 +++++++++---------
 .../kernel/controllers/memcg/memcontrol04.c    | 18 +++++++++---------
 2 files changed, 18 insertions(+), 18 deletions(-)

-- 
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2026-09-30 18:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 20:44 [LTP] [PATCH 0/2] memcg/memcontrol0[34]: Align with the kselftest protection model Sebastian Chlad
2026-09-26 20:44 ` [LTP] [PATCH 1/2] memcg/memcontrol0[34]: Use expected values from the " Sebastian Chlad
2026-09-28  6:27   ` Wei Gao via ltp
2026-09-29  7:06   ` [LTP] " linuxtestproject.agent
2026-09-30 15:04   ` [LTP] [PATCH 1/2] " Michal Koutný via ltp
2026-09-26 20:44 ` [LTP] [PATCH 2/2] memcg/memcontrol0[34]: Remove protection from the top level group Sebastian Chlad
2026-09-28  6:31   ` Wei Gao via ltp
2026-09-30 15:04   ` Michal Koutný via ltp
2026-09-30 18:36 ` [LTP] [PATCH 0/2] memcg/memcontrol0[34]: Align with the kselftest protection model Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.