[LTP] [PATCH 2/2] memcg/memcontrol0[34]: Remove protection from the top level group

Michal Koutný mkoutny@suse.com
Wed Sep 30 17:04:15 CEST 2026


On Sat, Sep 26, 2026 at 10:44:54PM +0200, Sebastian Chlad <sebastianchlad@gmail.com> wrote:
> From: Sebastian Chlad <sebastian.chlad@suse.com>
> 
> The memory pressure in both tests comes from A/G hitting the
> memory.max of A, so A is the reclaim root. Protection of the reclaim
> root is ignored by the kernel and the direct children of the root
> (A/B and A/G) use their own memory.min/memory.low as is, see
> page_counter_calculate_protection(). The 50M of memory.min
> (memcontrol03) and memory.low (memcontrol04) set on A thus has no
> effect on what the tests check; it would only protect the whole
> hierarchy against reclaim from outside, which the tests don't need.
> 
> The kselftest the tests are ported from dropped it for the same reason
> in kernel commit 6a35919005d4 ("selftests: memcg: remove protection
> from top level memcg"). Do the same and correct the descriptions, as
> the pressure is created in A, not in A/G.
> 
> Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
> ---
>  testcases/kernel/controllers/memcg/memcontrol03.c | 5 ++---
>  testcases/kernel/controllers/memcg/memcontrol04.c | 5 ++---
>  2 files changed, 4 insertions(+), 6 deletions(-)

Yes, this patch is easily tranferred.

Reviewed-by: Michal Koutný <mkoutny@suse.com>


More information about the ltp mailing list