Re: [PATCH RESEND] mm/vmscan: remove redundant folio_test_swapbacked()
From: Jialin Wang
Date: Mon Aug 11 2025 - 15:21:50 EST
On Tue, Aug 12, 2025 at 2:53 AM Harry Yoo <harry.yoo@xxxxxxxxxx> wrote:
>
> This is marked as RESEND, but which patch is it a resend of?
> I can’t find the original one.
>
I sent the original one to the wrong mailing list and missed proper cc's, sorry.
https://lore.kernel.org/lkml/20250811181839.40336-1-wjl.linux@xxxxxxxxx/
> On Tue, Aug 12, 2025 at 02:25:00AM +0800, Jialin Wang wrote:
> > When !folio_is_file_lru(folio) is false, it implies that
> > !folio_test_swapbacked(folio) must be true.
>
> That is not true.
>
This is the definition of folio_is_file_lru() in
include/linux/mm_inline.h line 28:
static inline int folio_is_file_lru(struct folio *folio)
{
return !folio_test_swapbacked(folio);
}
> MADV_FREE pages are anonymous pages that are not swapbacked
> (and thus can be reclaimed without pageout if they are clean).
>
Thanks for the explanation! I'm new to memory management, so this is
really helpful for me to learn.
Best regards,
Jialin Wang