On 10/27/26 15:51, Kiryl Shutsemau wrote: > ShmemPmdMapped is system-wide. A drop of 'own' or more from another > process between the two reads fails the test instead of being retried > as CHANGED.
Right. I'll send a new version where only a drop of exactly 'own' fails: that is the parent's share the bug takes off the counter when the child exits. Any other change will be retried. > The parent's THPs can also lose their PMDs during the test: reclaim can > swap one out, and NUMA balancing can migrate one, which leaves the > counter low while the migration entry is in place. That gives > FAIL_COUNTER, or FAIL_PARENT from the exact count in check_huge_shmem(). Right as well. In the new version the parent will check its own PMDs before it looks at the counter, and a missing one will mean a retry, not a failure. The same will go for a child that finds no PMDs because the parent has lost them. Only wrong data in the parent will stay FAIL_PARENT. Each retry will start over with a fresh file and mapping, since the old THPs may not come back as PMDs. The test will make three attempts. If all three are disturbed, it will skip and say which way: the counter kept changing, or the parent kept losing its PMDs. Thanks for the review! -- Konstantin Khorenko
