[LTP] memcg/memcontrol05: add cgroup v2 task migration charge accounting test

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Thu Aug 13 21:06:17 CEST 2026


Hi Pavithra,

On Aug 14, 2026, Pavithra wrote:
> memcg/memcontrol05: add cgroup v2 task migration charge accounting test

> +	SAFE_CG_PRINT(group_a, "memory.swap.max", "0");
> +	SAFE_CG_PRINT(group_b, "memory.swap.max", "0");

Could these writes be guarded with SAFE_CG_HAS()? Linux 7.2 registers the
cgroup swap files only when CONFIG_SWAP is enabled, but the memory controller
and migration behavior remain available without it. On a CONFIG_SWAP=n
kernel, the first SAFE_CG_PRINT() therefore reports TBROK instead of running
the test. When swap support is absent, skipping these writes is sufficient
because anonymous memory cannot be swapped.

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


More information about the ltp mailing list