From: Johannes Weiner <hannes@cmpxchg.org>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: akpm@linux-foundation.org, kasong@tencent.com,
qi.zheng@linux.dev, shakeel.butt@linux.dev, baohua@kernel.org,
axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com,
david@kernel.org, mhocko@kernel.org, ljs@kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: vmscan: remove the redundant FOLIOREF_RECLAIM_CLEAN logic
Date: Mon, 29 Jun 2026 08:43:28 -0400 [thread overview]
Message-ID: <akJocCUM4HEOegWW@cmpxchg.org> (raw)
In-Reply-To: <def70a713e10bcbdf3b9fccc2139ecc07b64f2cb.1782715791.git.baolin.wang@linux.alibaba.com>
On Mon, Jun 29, 2026 at 04:04:06PM +0800, Baolin Wang wrote:
> folio_check_references() will return FOLIOREF_RECLAIM_CLEAN for referenced
> file folios, indicating that we can proceed to reclaim clean file folios
> or keep them if they are dirty file folios. However, after commit 6b0dfabb3555
> ("fs: Remove aops->writepage"), we no longer attempt to write back filesystem
> folios through reclaim. Instead, we always activate dirty file folios and wakeup
> the flush workers to write them back. As a result, the FOLIOREF_RECLAIM_CLEAN
> logic is now redundant: for dirty file folios, we will no longer reach the
> 'references == FOLIOREF_RECLAIM_CLEAN' branch in shrink_folio_list().
>
> Additionally, lazyfree folios are also placed on the file LRU list, but if a
> lazyfree folio becomes dirty, try_to_unmap() will fail and thus prevent reclaim
> of the re-dirtied lazyfree folios.
>
> Therefore, we can drop the FOLIOREF_RECLAIM_CLEAN-related logic.
>
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Good catch and nice cleanup :)
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
next prev parent reply other threads:[~2026-06-29 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 8:04 [PATCH] mm: vmscan: remove the redundant FOLIOREF_RECLAIM_CLEAN logic Baolin Wang
2026-06-29 12:43 ` Johannes Weiner [this message]
2026-06-29 15:43 ` Shakeel Butt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=akJocCUM4HEOegWW@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=qi.zheng@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox