Re: [PATCH] mm/madvise: reclaim isolated folios if PTE restart fails

From: David Hildenbrand (Arm)

Date: Wed Sep 16 2026 - 10:55:48 EST


On 9/16/26 16:42, Gregory Price wrote:
> On Wed, Sep 16, 2026 at 03:12:53PM +0100, Lorenzo Stoakes (ARM) wrote:
>>>
>>> Going to spend a little more time testing and tweaking before I post it.
>>>
>>> I've been working on a making more extensive unit tests for certain
>>> parts of mm/ and this might be a good time to look at whether I can
>>> introduce a piece of it.
>>
>> Nice, curious as to how?
>>
>> Have you tried the userland VMA tests btw? Not tooting my own horn so to
>> speak :P but it's nice, though it comes at a bit of a cost in how the files
>> have to be set up...
>>
>
> Yes, in fact I used that as a start for exploring how I might make other
> components testable the same way.
>
> "Stubs... stubs everywhere"
>
> There's basically 4 testing mechanisms i explored:
>
> 1) selftest
> 2) Usermode Linux (UML)
> 3) Userland stuff like VMA
> 4) Linux Test Project (for syscall and ABI testing)
>
> selftests are really limited and actually create a maintenance burden,
> they're not real unit tests and are highly dependent on the actual
> machine configuration which is super annoying.
>
> But, lets take the page allocator as an example.
>
> The only piece of the page allocator that "should" (cough, simplifying
> here a bit) be machine specific is zone and node configurations... but
> I'm not convinced that this should require a full VM to unit-test.

I told Brendan exactly that (try stubbing it) and he tried ... and had to give
up at some point because it just wasn't feasible. ;)

--
Cheers,

David