VOOZH about

URL: https://www.phoronix.com/news/Linux-PCACHE-RFC

⇱ Linux PCACHE Proposed For Persistent Memory Cache For Block Devices - Phoronix


👁 Phoronix

Linux PCACHE Proposed For Persistent Memory Cache For Block Devices

Written by Michael Larabel in Linux Storage on 14 April 2025 at 06:07 AM EDT. 6 Comments
Sent out as a request for comments today is a patch series implementing PCACHE, a persistent memory cache for block devices. PCACHE was born out of code originally designed for the CXL block device driver but ultimately is useful outside the context of Compute Express Link as well.

Dongsheng Yang sent out the set of patches proposing PCACHE for the Linux kernel that is expanding the scope to any persistent memory device supporting direct access (DAX) rather than just CXL devices. The patch notes while PCACHE is a good fit for the discontinued Intel Optane product line, the Numemory NM101 storage-class memory is one product that could jive well with this proposed PCACHE.

One of the PCACHE patch messages goes on to explain:
"This patch introduces the initial integration of `pcache`, a Linux kernel block layer module that leverages persistent memory (PMem) as a high-performance caching layer for traditional block devices (e.g., SSDs, HDDs).

- Persistent Memory as Cache:
- `pcache` uses DAX-enabled persistent memory (e.g., `/dev/pmemX`) to provide fast, byte-addressable, non-volatile caching for block devices.
- Supports both direct-mapped and vmap-based access depending on DAX capabilities.

- Modular Architecture:
- `cache_dev`: represents a persistent memory device used as a cache.
- `backing_dev`: represents an individual block device being cached.
- `logic_dev`: exposes a block device (`/dev/pcacheX`) to userspace, serving as the frontend interface for I/O.
- `cache`: implements core caching logic (hit/miss, writeback, GC, etc.).

Design Motivation:

`pcache` is designed to bridge the performance gap between slow-but-large storage (HDDs, SATA/NVMe SSDs) and emerging byte-addressable persistent memory. Compared to traditional block layer caching, `pcache` is persistent, low-latency, highly concurrent, and more amenable to modern storage-class memory devices than legacy caching designs.

This patch finalizes the series by wiring up the initialization entry point (`pcache_init()`), sysfs bus registration, root device handling, and Kconfig glue.

With this, the `pcache` subsystem is ready to load as a kernel module and serve as a cache engine for block I/O."

There is also this diagram for comparing PCACHE features to the likes of BCache and the DeviceMapper write cache:

👁 PCACHE comparison


Those wanting to learn more about this PCACHE proposal can find it on the Linux kernel mailing list.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.