On 01/04/26 19:38, David Hildenbrand (Arm) wrote:
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?

Yes, there is still a small race window in the current approach.

I am looking into making this more reliable with a deterministic synchronization mechanism to avoid such timing dependencies.

I will send a v4 with this improvement.

Thanks,
Sayali

Reply via email to