News: 0001540508

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux PCACHE Proposed For Persistent Memory Cache For Block Devices

([Linux Storage] 6 Hours Ago Linux PCACHE)


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:

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



[1] https://lore.kernel.org/lkml/20250414014505.20477-1-dongsheng.yang@linux.dev/



varikonniemi

Weasel

skeevy420

numacross

What with chromodynamics and electroweak too
Our Standardized Model should please even you,
Tho' once you did say that of charm there was none
It took courage to switch as to say Earth moves not Sun.
Yet your state of the union penultimate large
Is the last known haunt of the Fractional Charge,
And as you surf in the hot tub with sourdough roll
Please ponder the passing of your sole Monopole.
Your Olympics were fun, you should bring them all back
For transsexual tennis or Anamalon Track,
But Hollywood movies remain sinfully crude
Whether seen on the telly or Remotely Viewed.
Now fasten your sunbelts, for you've done it once more,
You said it in Leipzig of the thing we adore,
That you've built an incredible crystalline sphere
Whose German attendants spread trembling and fear
Of the death of our theory by Particle Zeta
Which I'll bet is not there say your article, later.
-- Sheldon Glashow, Physics Today, December, 1984