Re: [PATCH] mm: move folio LRU helpers out of swap
From: Michal Hocko
Date: Tue Apr 07 2026 - 07:22:27 EST
On Tue 07-04-26 19:00:02, Jianyue Wu wrote:
> All allocated folios are added into lru lists for later reclaim whether
> they are file or anonymous folios. However those folio lru operation codes
> are put in mm/swap.c which is not so appropriate. Because swap code is
> only for anonymous folios.
>
> Here move folio lru helpers out of mm/swap.c and put them into file for
> their own.
>
> This is cleanup, no functional change involved.
>
> Signed-off-by: Jianyue Wu <wujianyue000@xxxxxxxxx>
> ---
> MAINTAINERS | 2 +
> include/linux/mm.h | 2 +
> include/linux/swap.h | 38 --
> mm/Makefile | 2 +-
> mm/folio_lru.c | 1074 ++++++++++++++++++++++++++++++++++++++++++
> mm/folio_lru.h | 53 +++
> mm/swap.c | 1064 +----------------------------------------
All that big churn is really worth it? Are there any other reasons than
"not so appropriate"?
Really if this is not a part of a much bigger plan then NAK.
--
Michal Hocko
SUSE Labs