Re: [PATCH] mm/madvise: reclaim isolated folios if PTE restart fails
From: Gregory Price
Date: Tue Sep 15 2026 - 13:21:36 EST
On Tue, Sep 15, 2026 at 04:55:47PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Sat, Sep 12, 2026 at 07:08:32AM -0400, Gregory Price wrote:
> > MADV_PAGEOUT collects isolated folios on a local list before reclaiming
> > them after the PTE walk. The reschedule path drops the PTE lock and then
> > restarts the mapping with pte_offset_map_lock().
>
> Is this reschedule path even necessary? It's pretty bloody sketchy.
>
> I thought the modern approach (TM) was to not do cond_resched() and friends so
> can we actually look at removing this?
>
Sorry - meant to reply to this.
Honestly there's so much jammed into this function i can't give you a
straight answer. I can take a short detour to figure out if we can
rework this as a whole.
~Gregory