From: "Michal Koutný via ltp" <ltp@lists.linux.it>
To: Sebastian Chlad <sebastianchlad@gmail.com>
Cc: Sebastian Chlad <sebastian.chlad@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] memcg/memcontrol0[34]: Use expected values from the protection model
Date: Wed, 30 Sep 2026 17:04:05 +0200 [thread overview]
Message-ID: <ar0k4cOIGinJHU6o@localhost.localdomain> (raw)
In-Reply-To: <20260926204459.20699-2-sebastianchlad@gmail.com>
Hello.
On Sat, Sep 26, 2026 at 10:44:53PM +0200, Sebastian Chlad <sebastianchlad@gmail.com> wrote:
> From: Sebastian Chlad <sebastian.chlad@suse.com>
>
> memcontrol03 (memory.min) and memcontrol04 (memory.low) still expect
> A/B/C ~= 33M and A/B/D ~= 17M after reclaim, which are the values from
> the original kselftest. These were never derived from how the kernel
> distributes protection among siblings, and the kselftest replaced them
> with simulated values for both tests in kernel commit f10b6e9a8e66
> ("selftests: memcg: adjust expected reclaim values of protected
> cgroups"):
>
> A/B/C memory.current ~= 29M
> A/B/D memory.current ~= 21M
>
> (see tools/testing/selftests/cgroup/memcg_protection.m for the model).
>
> Real kernels match the model,
Note: this was true at the time of the model introduction but the
contemporary kernels may diverge slightly from it. (Not conceptually
AFAIR, although some rounding / effective values caching could possibly
affect the final values.)
> so the old D target leaves very little
> room below the upper bound of the 20% tolerance. On 6.12 x86_64, 105
> iterations of memcontrol03 across ext2, ext3, ext4, xfs and btrfs gave:
>
> A/B/C 27.5M - 27.9M (old range 22.0M - 49.5M)
> A/B/D 22.7M - 23.0M (old range 11.3M - 25.5M)
>
> so A/B/D is already at ~90% of the old limit and small variations in
> reclaim push it over. Passing runs on 6.4 ppc64le show the same
> picture for both tests (C 22.6M - 32.0M, D 17.6M - 24.2M).
>
> Switch to the model values. Keep the 20% tolerance, which is already
> at least as wide as the kselftest's; kernel commit d2def68ae06a
> ("selftests: memcg: increase error tolerance of child memory.current
> check in test_memcg_protection()") raised the kselftest tolerances to
> 15% (C) and 20% (D) for the same kind of sporadic failures.
Makes sense to sync this with the kernel variant.
Reviewed-by: Michal Koutný <mkoutny@suse.com>
> This doesn't change the outcome where C is reclaimed far below D while
> the unprotected A/B/F keeps its pagecache (seen e.g. on ppc64le with
> C ~= 6M and F ~= 13M). That is a protection failure the tests should
> keep reporting.
I presume you refer the same reclaim mode "collapse" that was tackled in
7e19705f7 ("memcg/memcontrol04: Fix judgment for recursive_protection")
(there it was only for unexpected events but that could be connected
with the unexpected final F.memory.current). It is nothing new, correct?
Thanks,
Michal
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-09-30 15:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Michal Koutný via ltp [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ar0k4cOIGinJHU6o@localhost.localdomain \
--to=ltp@lists.linux.it \
--cc=mkoutny@suse.com \
--cc=sebastian.chlad@suse.com \
--cc=sebastianchlad@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox