Re: [PATCH 1/8] mm: implement cleancache
From: Suren Baghdasaryan
Date: Thu Oct 09 2025 - 21:43:23 EST
On Thu, Oct 9, 2025 at 6:31 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, 9 Oct 2025 18:19:44 -0700 Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:
>
> > Subject: [PATCH 1/8] mm: implement cleancache
>
> Well that's confusing. We removed cleancache 3+ years ago in 0a4ee518185e.
Yes, this version is a complete rewrite. Previous version was a thin
layer acting as a middleman and having hooks deep in the FS code. This
version implements most of the cleancache page management inside
cleancache itself and allows GCMA and future clients to be thin. It is
also much less invasive, limiting its hooks mostly to the MM code.
>From the cover letter:
New implementation:
1. Avoids intrusive hooks into filesystem code, limiting them to two
hooks for filesystem mount/unmount events and a hook for bdev
invalidation.
2. Manages inode to folio association and handles pools of donated
folios inside cleancache itself, freeing backends of this burden.
The idea was presented at this year's LSF/MM and RFC was posted at
https://lore.kernel.org/all/20250320173931.1583800-1-surenb@xxxxxxxxxx/
earlier this year.