Re: [RFC PATCH v3 0/4] mm: enable lru cache for smaller large folios

"David Hildenbrand (Arm)" <[email protected]>
Newsgroups org.kvack.linux-mm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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/[email protected]
)

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.