Re: [PATCH v3 04/13] selftest/mm: fix cgroup task placement and drop memory.current checks in hugetlb_reparenting_test.sh
From: David Hildenbrand (Arm)
Date: Wed Apr 01 2026 - 10:22:45 EST
On 3/27/26 08:15, Sayali Patil wrote:
> Launch write_to_hugetlbfs as a separate process and move only its PID
> into the target cgroup before waiting for completion. This avoids moving
> the test shell itself, prevents unintended charging to the shell, and
> ensures hugetlb and memcg accounting is attributed only to the intended
> workload.
>
> Add a short delay before the hugetlb allocation to avoid a race where
> memory may be charged before the task migration takes effect, which
> can lead to incorrect accounting and intermittent test failures.
Isn't there still a chance for a race, for example, when running in a VM?
--
Cheers,
David