[LTP] memcg/memcontrol05: add cgroup v2 task migration charge accounting test
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Thu Aug 13 19:09:42 CEST 2026
Hi Pavithra,
On Thu, Aug 13, 2026, Pavithra wrote:
> memcg/memcontrol05: add cgroup v2 task migration charge accounting test
> group_a = tst_cg_group_mk(tst_cg, "group_a");
> group_b = tst_cg_group_mk(tst_cg, "group_b");
>
> SAFE_CG_SCANF(group_b, "memory.current", "%ld", &baseline_b);
Could the test disable swapping for both child cgroups before starting the
worker? Touching the pages only makes them resident at that instant. Under
memory pressure, group_a pages can be swapped between the checkpoint and
the reads, so memory.current drops while the charge remains correctly
associated with group_a in memory.swap.current. The same race affects the
group_b delta after the second allocation and can produce a false failure.
Setting memory.swap.max to 0, or otherwise keeping the pages resident, would
make the memory.current assertions measure migration accounting reliably.
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