Re: [PATCH 20/25] s390/fbatch: no lru_add_drain_all() in s390_wiggle_split_folio()

From: David Hildenbrand (Arm)

Date: Thu Aug 27 2026 - 16:28:58 EST



>> I most certanly don't know s390 or that code well enough to guarantee
>> you that no stray references to mapped folios can remain there. What I
>> can guarantee is that no references, of the kind which lru_add_drain_all()
>> used to be needed to remove, can exist there: so there will no longer
>> be any point in s390 (or others) calling it for that reason, to help
>> split_folio() to succeed.
>
> we are not using it to help split_folio() succeed (although that's a
> pleasant side effect). We need it even for small pages, to guarantee
> that no extra reference from LRU is present on the page.

Just to clarify: the LRU cache might have references (IOW a pointer) to the
folio BUT the refcount of the folio is not increased.

And that's what s390x cares about.

[...]

>
>> there was an earlier time when mm did not enforce that; and Barry
>> is currently looking to relax that, so the limitation intended for
>> pmd-sized folios is no longer forced on the smallest large folios.
>>
>> If Barry's relaxation goes in before my drainage changes, then
>> there is value in that s390 lru_add_drain_all() in the interim.

I think we should get lru cache references sorted before we consider using them
for (m)THP.

If we realize that this series here cannot land any time soon, we can reconsider.

--
Cheers,

David