Re: [External Sender] Re: [PATCH] selftests/mm: add folio_split() and filemap_get_entry() race test

From: Bas van Dijk

Date: Tue Mar 17 2026 - 05:48:24 EST


No problem for me either.

Signed-off-by: Bas van Dijk <bas@xxxxxxxxxxx>

I'll add a GPL-2.0 license to the repo.

On Tue, Mar 17, 2026 at 8:32 AM Adam Bratschi-Kaye
<adam.bratschikaye@xxxxxxxxxxx> wrote:
>
> On 13 Mar 2026, at 7:40, Zi Yan wrote:
> > The added folio_split_race_test is a modified C port of the race condition
> > test from [1]. The test creates shmem huge pages shared by both a parent
> > and a child processes, where the parent process punches holes in the shmem
> > to cause folio_split() in the kernel and the child process reads the shmem
> > in 16 threads to cause filemap_get_entry() in the kernel.
>
> Note that the fork isn't actually necessary to reproduce the issue. I
> had it working as
> well with the reading and punching in the same process, but just with
> two separate
> mappings. Not that it makes much of a difference - just in case you
> wanted to simplify
> the test.
>
> On 14 Mar 2026, at 18:27, Andrew Morton wrote:
> > I couldn't immediately find any licensing info there. Bas and Adam,
> > please advise?
>
> GPL-2.0 license is fine by me.
>
> > And sending your Signed-off-by's would be appropriate.
>
> No problem:
>
> Signed-off-by: Adam Bratschi-Kaye <adam.bratschikaye@xxxxxxxxxxx>
>
> Thanks,
> Adam