Linux's CleanCache Set To Be Cleaned From The Kernel After Being Hyped Up A Decade Ago
Merged today into Linux-Next as part of Andrew Morton's patches is the removal of CleanCache. Why? Because, well, there are no more users left. Since the removal of the Xen Transcendent Memory (TMEM) driver code in 2019, CleanCache hasn't had any users left but still living within the kernel.
CleanCache was developed by Oracle engineers and at the time it was introduced they announced it as "something that's actually very cool, has huge potential to make running VMs super optimized/performant/efficient and is the result of quite a bit of research and experimentation."
Or summed up by the kernel docs a bit more conservatively as, "Cleancache is a new optional feature provided by the VFS layer that potentially dramatically increases page cache effectiveness for many workloads in many environments at a negligible cost. Cleancache can be thought of as a page-granularity victim cache for clean pages that the kernel’s pageframe replacement algorithm (PFRA) would like to keep around, but can’t since there isn’t enough memory. So when the PFRA “evicts” a page, it first attempts to use cleancache code to put the data contained in that page into “transcendent memory”, memory that is not directly accessible or addressable by the kernel and is of unknown and possibly time-varying size."
But now a decade after being drummed up by Oracle, it's set to be retired with no in-kernel code making use of it. With it removed in Linux-Next as part of AKPM's patches, it will likely see its mainline removal come Linux 5.17.