Linux Test Project
 help / color / mirror / Atom feed
From: "Michal Koutný via ltp" <ltp@lists.linux.it>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1 2/2] memcontrol03, memcontrol04: Set protection on parent cgroups to prevent kswapd over-reclaim
Date: Mon, 5 Oct 2026 17:37:46 +0200	[thread overview]
Message-ID: <asPB9JgbOowPDAgX@blackbook2> (raw)
In-Reply-To: <20261004143332.25978-3-wegao@suse.com>


[-- Attachment #1.1: Type: text/plain, Size: 1696 bytes --]

Hello Wei.

On Sun, Oct 04, 2026 at 02:33:27PM +0000, Wei Gao <wegao@suse.com> wrote:
> On NUMA systems (observed on PowerPC), allocating memory can trigger
> node-level memory pressure, waking up kswapd when free pages fall below
> the low watermark on a node.
> 
> In cgroup v2, both hard protection (memory.min) and best-effort protection
> (memory.low) are hierarchical and calculated top-down: effective
> protection of descendant cgroups is bounded by their ancestors' protection
> values. When LTP runs inside an existing cgroup hierarchy, ancestor cgroups
> above the test root have memory.min and memory.low set to 0.

Note that this is expected behavior of protection and the test is meant
to work "relatively" with its own pressure source and target [1].


> As a result, when kswapd performs node-level background reclaim from the
> root cgroup downwards, ancestor cgroups without protection provide no
> protection boundary. kswapd reclaims pages from descendant leaf cgroups
> regardless of their local memory.min / memory.low settings, causing
> memcontrol03 and memcontrol04 to fail with over-reclaim:

Generally, this is not specific to this test -- it is because it the
whole host is overcommitted (edit: as I see the NUMA info below it could
be perhaps that only individual nodes are too small).

So I wonder could this be ensured at higher level -- something that sets
up the environment of the individual runners (e.g. reduce parallelism,
partition the system with memory limits or as a variant configure
generic memory protection)?

WDYT?
Michal


[1] https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#reclaim-protection

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


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

  reply	other threads:[~2026-10-05 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-04 14:33 [LTP] [PATCH v1 0/2] memcontrol03, memcontrol04: Set protection on parent cgroups to prevent kswapd over-reclaim Wei Gao via ltp
2026-10-04 14:33 ` [LTP] [PATCH v1 1/2] memcontrol: Add helpers to set and restore parent memory knobs Wei Gao via ltp
2026-10-04 15:47   ` [LTP] " linuxtestproject.agent
2026-10-04 14:33 ` [LTP] [PATCH v1 2/2] memcontrol03, memcontrol04: Set protection on parent cgroups to prevent kswapd over-reclaim Wei Gao via ltp
2026-10-05 15:37   ` Michal Koutný via ltp [this message]
2026-10-08  2:10     ` Wei Gao via ltp
2026-10-12 14:13       ` Michal Koutný via ltp

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=asPB9JgbOowPDAgX@blackbook2 \
    --to=ltp@lists.linux.it \
    --cc=mkoutny@suse.com \
    --cc=wegao@suse.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