Re: [PATCH 02/25] mm/fbatch: allow folios_put_refs() to skip xa_is_value() entries
From: Vlastimil Babka (SUSE)
Date: Tue Sep 08 2026 - 12:44:53 EST
On 8/24/26 15:55, Hugh Dickins wrote:
> Let folios_put_refs() (hence folio_batch_release()) skip xa_is_value()
> entries, and therefore remove unneeded folio_batch_remove_exceptionals().
>
> It made some sense when introduced in 3.1 for shmem swap entries only,
> but workingset shadows popularized exceptional entries in 3.15, and it's
> silly for so many sites to be squashing exceptionals out of the fbatch,
> merely to suit an inadequacy in folios_put_refs().
>
> But remove exceptionals on leaving truncate_folio_batch_exceptionals(),
> one of whose callers then passes the fbatch on to others less tolerant.
>
> No longer essential to this series, since 7.2 commit 9669b87065a6
> ("mm/lruvec: preemptively free dead folios during lru_add drain")
> allowed folios_put_refs() to skip NULLs; but still an improvement.
>
> Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
Like David, I don't understand what exactly
truncate_folio_batch_exceptionals() does. But this patch seems correct to
me, so:
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>