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

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Wed Aug 12 19:07:40 CEST 2026


Hi Pavithra,

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

> +#define ALLOC_SIZE	MB(60)
> +#define ALLOC_SIZE2	MB(20)
> +#define MIN_MEM_AVAIL	80

[Medium] Could MIN_MEM_AVAIL include headroom above the two mappings? The
worker keeps both mappings resident simultaneously, so a host with exactly
80 MiB available passes the framework check but still needs memory for page
tables and other process and kernel allocations. The worker can be OOM-killed
while touching the mappings, producing a timeout or TBROK instead of testing
charge accounting.

> +	SAFE_CG_SCANF(group_b, "memory.current", "%ld", &after_migrate);
> +	TST_EXP_EXPR(after_migrate <= baseline_b + (long)MB(4),
> +		     "group_b memory.current (%ld) not increased after migration (baseline=%ld)",
> +		     after_migrate, baseline_b);

[Medium] Could this also read and verify group_a/memory.current after the
migration? The stated invariant is that existing charges remain pinned to
group_a, but this checks only that group_b did not gain them. A regression
that drops those charges during migration leaves group_b within the allowed
range and reports TPASS despite violating the invariant.

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