Re: [PATCH v4 5/5] ksm: add mremap selftests for ksm_rmap_walk

From: xu.xin16

Date: Mon May 18 2026 - 23:27:07 EST


> >>> 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?

Agreed. I'll simplify to single process only. Thanks.