[LTP] [PATCH v1 2/2] memcontrol03, memcontrol04: Set protection on parent cgroups to prevent kswapd over-reclaim

Michal Koutný mkoutny@suse.com
Mon Oct 12 16:13:51 CEST 2026


On Thu, Oct 08, 2026 at 02:10:17AM +0000, Wei Gao <wegao@suse.com> wrote:
> Protecting this solely from the external runner is tricky since LTP builds
> a 3-level cgroup hierarchy:
> - /sys/fs/cgroup/ltp (Level 1)
> - tst_cg (/sys/fs/cgroup/ltp/ltp-testxxxx, Level 2 — trunk_A's parent)
> - trunk_cg[A] (Level 3 — trunk_B's parent)
> Every level in this chain needs memory.low = 50M. Even if an external runner 
> sets it at /sys/fs/cgroup/ltp, tst_cg or trunk_A will break the protection chain.

I see. (Note that this needn't be the same 50M as inside the test. The
value at this level would denote some protection sufficient for test's
stability.)

> Another option is make sure enough memory to the test environment so kswapd 
> doesn't get triggered at all. I guess we can do this to avoid issue?

That sounds even better (or limit amount of tests running in parallel
wrt available amounts), memory.low on the high level is best-effort in
the end.


Michal


More information about the ltp mailing list