From: linuxtestproject.agent@gmail.com
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] memcontrol: Add helpers to set and restore parent memory knobs
Date: Sun, 4 Oct 2026 15:47:39 +0000 [thread overview]
Message-ID: <20261004154739.9367-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20261004143332.25978-2-wegao@suse.com>
Hi Wei,
On 4 October 2026, Wei Gao wrote:
> memcontrol: Add helpers to set and restore parent memory knobs
--- [PATCH 2/2] ---
> + set_parent_memory_knob("memory.min", "50M");
> + set_parent_memory_knob("memory.low", "50M");
High severity: overlapping instances of the same test race on the shared
ltp knob: X saves 0, Y saves X's 50M, X restores 0 while Y is active, and
Y finally restores 50M instead of the original 0. This both removes an
active test's protection and leaves a pre-existing ltp group modified.
Serialize the complete shared-parent save/use/restore interval, not just
the individual reads and writes.
> static void cleanup(void)
> {
> + restore_parent_memory_knob("memory.min");
High severity: the same problem applies to memory.low cleanup: the
snapshots exist only in the forked test worker, which the framework kills
without running this callback on timeout or interruption. The supervisor
does not restore these knobs, so a pre-existing ltp group retains 50M.
Move shared-parent bookkeeping and restoration into supervising cgroup
cleanup, before cgroup teardown.
> Set memory.min and memory.low on trunk_A and parent cgroups up through the
> hierarchy before allocating child pagecache, ensuring protection propagates
> down the tree to prevent kswapd over-reclaim under NUMA memory pressure,
Medium severity: the helper stops at ltp, so it does not establish this
protection when the cgroup mount is rooted in a delegated subtree or
namespace whose root has memory.min/low set to 0. Global reclaim still
walks that real ancestor, and page_counter_calculate_protection() caps
the descendants' effective protection to 0. Handle or report insufficient
ancestor protection and document the restriction instead of claiming
protection throughout arbitrary hierarchies.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-10-04 15:48 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 ` linuxtestproject.agent [this message]
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
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=20261004154739.9367-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--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 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.