Re: [PATCH v4 5/5] ksm: add mremap selftests for ksm_rmap_walk
From: David Hildenbrand (Arm)
Date: Mon May 18 2026 - 09:36:58 EST
On 5/18/26 15:10, xu.xin16@xxxxxxxxxx wrote:
>>>
>>> This test runs in multi-threads, So there are not only one page from this thread but
>>> also many other pages which are mergeable in all other threads.
>>
>> At least the test did not reveal the problem in patch #3 :)
>>
>> Can't we just use a single VMA (e.g., 32 pages), fill it with pages of the same
>> content, let it merge, then mremap half of it, and then migrate a page etc?
>>
>
> Yes, a single VMA with multiple pages works perfectly and is simpler.
>
> But I'm wondering: should we still support a multi‑process version (Only one work process
> do mremap and migrate, while other processes just do check(PFN) ?
>
>
> What's your opinion? I can drop the multi‑process part if you think it's unnecessary.
I assume a single process should do, right?
--
Cheers,
David