Re: [PATCH 01/10] selftests/mm: exercise MADV_COLD and MADV_PAGEOUT

From: David Hildenbrand (Arm)

Date: Thu Sep 24 2026 - 07:39:05 EST


On 9/23/26 16:46, Lorenzo Stoakes (ARM) wrote:
> On Wed, Sep 23, 2026 at 10:44:17AM -0400, Gregory Price wrote:
>> On Wed, Sep 23, 2026 at 03:26:05PM +0100, Lorenzo Stoakes (ARM) wrote:
>>>
>>> I think in general we want to avoid putting stress tests as part of the
>>> selftests in general? Or at least if they might take a long time to run or
>>> excessive memory usage, etc.
>>>
>>> Though that might be benchmarks, as we have the THP stress tests so maybe it's
>>> OK?
>>>
>>>
>>> In any case I really do think this should be split out into smaller parts, this
>>> is a _gigantic_ change :)
>>>
>>
>> Absolutely, but alas my poor email hosting throttles me if i send too
>> many emails - and sending a 38-part series where the important part is
>> the endpoint of the refactor moreso than the individual tests...
>> instant 24-hour timeout.
>>
>> I'm working on a solution. Need better hosting.
>
> Thanks! But yeah damn indeed you do! :)
>
> Though larger series can scare people off so maybe better to send the tests
> separately?

In any case, we have to break this down into reviewable pieces. We neglected
selftests for too long.

... and there are some schlopped tests in there that we really shouldn't have as
they are way too special and hard to maintain.

Like this monstrosity:

+/*
+ * A folio faulted on another CPU can remain in that CPU's pending LRU batch.
+ * MADV_COLD drains only the calling CPU and must safely skip the non-LRU
+ * folio without changing the mapping.
+ */
+static void test_madvise_cold_remote_lru_batch(void)
+{

--
Cheers,

David