From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: David Hildenbrand <david@redhat.com>,
akpm@linux-foundation.org, hannes@cmpxchg.org
Cc: mhocko@kernel.org, zhengqi.arch@bytedance.com,
shakeel.butt@linux.dev, lorenzo.stoakes@oracle.com,
hughd@google.com, willy@infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: vmscan: remove folio_test_private() check in pageout()
Date: Fri, 12 Sep 2025 16:31:38 +0800 [thread overview]
Message-ID: <b6fa0add-e739-499d-9fbf-32454b5e137a@linux.alibaba.com> (raw)
In-Reply-To: <94cfb423-1dc5-43e1-bd1f-75b8d43fdc1a@redhat.com>
On 2025/9/12 16:24, David Hildenbrand wrote:
> On 12.09.25 10:24, David Hildenbrand wrote:
>> On 12.09.25 05:45, Baolin Wang wrote:
>>> Currently, we no longer attempt to write back filesystem folios in
>>> pageout(),
>>> and only tmpfs/shmem folios and anonymous swapcache folios can be
>>> written back.
>>
>> Can you point me at the code where that is fenced off?
Please see the following check in pageout():
if (!shmem_mapping(mapping) && !folio_test_anon(folio))
return PAGE_ACTIVATE;
>> I can spot a folio_is_file_lru() check before we call it, but the
>> description tells me that there are indeed ways we could still pass that
>> check for file-lru folios if we are kswapd.
Yes, but this also needs further cleanup, as kswapd also cannot reclaim
filesystem dirty folios in pageout(). I plan to continue optimizing
dirty file folios in isolate_lru_folios() to avoid some unnecessary scans.
>>> Moreover, tmpfs/shmem and swapcache folios do not use the PG_private
>>> flag,
>>> which means no fs-private private data is used. Therefore, we can
>>> remove the
>>> redundant folio_test_private() checks and related buffer_head release
>>> logic.
>>
>> If that's indeed the case, do we still need the folio_test_private()
>> check in is_page_cache_freeable()?
>
> Ah, that's patch #2 :)
>
next prev parent reply other threads:[~2025-09-12 8:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 3:45 [PATCH 0/2] some cleanups for pageout() Baolin Wang
2025-09-12 3:45 ` [PATCH 1/2] mm: vmscan: remove folio_test_private() check in pageout() Baolin Wang
2025-09-12 8:24 ` David Hildenbrand
2025-09-12 8:24 ` David Hildenbrand
2025-09-12 8:31 ` Baolin Wang [this message]
2025-09-12 8:57 ` David Hildenbrand
2025-09-12 9:03 ` Baolin Wang
2025-09-12 8:57 ` David Hildenbrand
2025-09-12 15:21 ` Matthew Wilcox
2025-09-13 3:04 ` Baolin Wang
2025-09-15 20:47 ` Matthew Wilcox
2025-09-18 2:45 ` Baolin Wang
2025-09-12 16:13 ` Shakeel Butt
2025-09-13 3:24 ` Baolin Wang
2025-09-15 20:00 ` Shakeel Butt
2025-09-16 4:00 ` Hugh Dickins
2025-09-16 7:18 ` Baolin Wang
2025-09-17 3:50 ` Baolin Wang
2025-09-17 7:49 ` Hugh Dickins
2025-09-18 2:22 ` Baolin Wang
2025-09-12 3:45 ` [PATCH 2/2] mm: vmscan: simplify the folio refcount " Baolin Wang
2025-09-12 8:58 ` David Hildenbrand
2025-09-12 16:16 ` 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=b6fa0add-e739-499d-9fbf-32454b5e137a@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=willy@infradead.org \
--cc=zhengqi.arch@bytedance.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