From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Barry Song (Xiaomi)" <baohua@kernel.org>,
akpm@linux-foundation.org, linux-mm@kvack.org
Cc: baolin.wang@linux.alibaba.com, dev.jain@arm.com,
lance.yang@linux.dev, liam@infradead.org,
linux-kernel@vger.kernel.org, ljs@kernel.org, mhocko@suse.com,
npache@redhat.com, rppt@kernel.org, ryan.roberts@arm.com,
surenb@google.com, vbabka@kernel.org, ziy@nvidia.com,
hughd@google.com, ackerleytng@google.com, usama.arif@linux.dev,
joannelkoong@gmail.com, hannes@cmpxchg.org
Subject: Re: [RFC PATCH v3 0/4] mm: enable lru cache for smaller large folios
Date: Thu, 20 Aug 2026 20:23:12 +0200 [thread overview]
Message-ID: <c8287b5a-8f8b-4110-ad47-996842f01bfe@kernel.org> (raw)
In-Reply-To: <20260818225904.55236-1-baohua@kernel.org>
On 8/19/26 00:59, Barry Song (Xiaomi) wrote:
> This patchset enables the per-CPU LRU cache for large folios with fewer
> than `FOLIO_BATCH_SIZE` (31) pages. It also limits each per-CPU LRU cache
> to at most `FOLIO_BATCH_SIZE` pages to avoid negatively affecting
> accounting and memory reclamation pressure.
>
> This is particularly beneficial on systems that use relatively small
> large folios. For larger folios, the benefit is likely to be smaller
> because far fewer folios are expected to contend for the LRU cache.
As raised, there is this problem with collect_longterm_unpinnable_folios()
(see
https://lore.kernel.org/r/20260806-lru_cache_drain_for_folio-v1-1-c6287d295e99@kernel.org
)
whereby we don't know how many refs we actually hold. Certainly not 1.
We might have to wait for Hugh's cleanup to handle that cleanly (and avoid all
the other LRU cache draining).
--
Cheers,
David
next prev parent reply other threads:[~2026-08-20 18:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 22:59 Barry Song (Xiaomi)
2026-08-18 22:59 ` [RFC PATCH v3 1/4] mm: allow smaller large folios to use lru_cache Barry Song (Xiaomi)
2026-08-19 4:34 ` Barry Song
2026-08-18 22:59 ` [RFC PATCH v3 2/4] mm: improve large folio reuse for LRU-cached folios Barry Song (Xiaomi)
2026-08-18 22:59 ` [RFC PATCH v3 3/4] mm: drain LRU cache if necessary for splitting large folios Barry Song (Xiaomi)
2026-08-20 10:14 ` Barry Song
2026-08-18 22:59 ` [RFC PATCH v3 4/4] mm: batch lru_cache draining in deferred_split_scan Barry Song (Xiaomi)
2026-08-19 3:02 ` [RFC PATCH v3 0/4] mm: enable lru cache for smaller large folios Lance Yang
2026-08-19 4:38 ` Barry Song
2026-08-20 18:23 ` David Hildenbrand (Arm) [this message]
2026-08-20 20:18 ` Barry Song
2026-08-20 20:22 ` Barry Song
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=c8287b5a-8f8b-4110-ad47-996842f01bfe@kernel.org \
--to=david@kernel.org \
--cc=ackerleytng@google.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dev.jain@arm.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=joannelkoong@gmail.com \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=npache@redhat.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=usama.arif@linux.dev \
--cc=vbabka@kernel.org \
--cc=ziy@nvidia.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
all inboxes | Powered by JetHome®