twx-linux/Documentation
Dongsheng Yang 1d57628ff9 dm-pcache: add persistent cache target in device-mapper
This patch introduces dm-pcache, a new DM target that places a DAX-
capable persistent-memory device in front of any slower block device and
uses it as a high-throughput, low-latency  cache.

Design highlights
-----------------
- DAX data path – data is copied directly between DRAM and the pmem
  mapping, bypassing the block layer’s overhead.

- Segmented, crash-consistent layout
  - all layout metadata are dual-replicated CRC-protected.
  - atomic kset flushes; key replay on mount guarantees cache integrity
    even after power loss.

- Striped multi-tree index
  - Multi‑tree indexing for high parallelism.
  - overlap-resolution logic ensures non-intersecting cached extents.

- Background services
  - write-back worker flushes dirty keys in order, preserving backing-device
    crash consistency. This is important for checkpoint in cloud storage.
  - garbage collector reclaims clean segments when utilisation exceeds a
    tunable threshold.

- Data integrity – optional CRC32 on cached payload; metadata always protected.

Comparison with existing block-level caches
---------------------------------------------------------------------------------------------------------------------------------
| Feature                          | pcache (this patch)             | bcache                       | dm-writecache             |
|----------------------------------|---------------------------------|------------------------------|---------------------------|
| pmem access method               | DAX                             | bio (block I/O)              | DAX                       |
| Write latency (4 K rand-write)   | ~5 µs                           | ~20 µs                       | ~5 µs                     |
| Concurrency                      | multi subtree index             | global index tree            | single tree + wc_lock     |
| IOPS (4K randwrite, 32 numjobs)  | 2.1 M                           | 352 K                        | 283 K                     |
| Read-cache support               | YES                             | YES                          | NO                        |
| Deployment                       | no re-format of backend         | backend devices must be      | no re-format of backend   |
|                                  |                                 | reformatted                  |                           |
| Write-back ordering              | log-structured;                 | no ordering guarantee        | no ordering guarantee     |
|                                  | preserves app-IO-order          |                              |                           |
| Data integrity checks            | metadata + data CRC(optional)   | metadata CRC only            | none                      |
---------------------------------------------------------------------------------------------------------------------------------

Signed-off-by: Dongsheng Yang <dongsheng.yang@linux.dev>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2025-08-25 15:25:29 +02:00
..
ABI blk-wbt: doc: Update the doc of the wbt_lat_usec interface 2025-08-11 10:21:38 -06:00
accel
accounting delaytop: enhance error logging and add PSI feature description 2025-08-02 12:01:41 -07:00
admin-guide dm-pcache: add persistent cache target in device-mapper 2025-08-25 15:25:29 +02:00
arch It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
block
bpf
cdrom cdrom: Call cdrom_mrw_exit from cdrom_release function 2025-07-22 19:10:17 -06:00
core-api Significant patch series in this pull request: 2025-08-05 16:02:07 +03:00
cpu-freq
crypto crypto: engine - remove {prepare,unprepare}_crypt_hardware callbacks 2025-07-18 20:52:00 +10:00
dev-tools Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
devicetree Including fixes from Netfilter and IPsec. 2025-08-14 07:14:30 -07:00
doc-guide
driver-api cxl for v6.17 2025-08-01 15:47:06 -07:00
edac
fault-injection docs: fault-injection: drop reference to md-faulty 2025-07-24 08:31:46 -06:00
fb
features
filesystems f2fs-for-6.17-rc1 2025-08-04 16:27:21 -07:00
firmware_class
firmware-guide Merge branch 'acpi-misc' 2025-07-22 17:12:57 +02:00
fpga
gpu drm for 6.17-rc1 2025-07-30 19:26:49 -07:00
hid
hwmon hwmon updates for v6.17 2025-07-31 13:34:06 -07:00
i2c
iio
images
infiniband
input Input: Add and document BTN_GRIP* 2025-07-27 01:41:20 -07:00
isdn
kbuild docs: kconfig: add alldefconfig to the all*configs 2025-07-26 15:31:29 +09:00
kernel-hacking
leds
litmus-tests
livepatch
locking
maintainer
mhi
misc-devices
mm Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
netlabel
netlink netlink: specs: ethtool: fix module EEPROM input/output arguments 2025-07-31 10:57:02 -07:00
networking docs: Fix name for net.ipv4.udp_child_hash_entries 2025-08-12 13:03:13 +02:00
nvdimm
nvme docs: nvme: fix grammar in nvme-pci-endpoint-target.rst 2025-07-17 13:38:07 +02:00
PCI selftests: pci_endpoint: Add doorbell test case 2025-07-24 16:51:47 -05:00
pcmcia
peci
power Merge branches 'pm-runtime' and 'pm-powercap' 2025-07-22 18:01:15 +02:00
process It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
RCU rcu: Document concurrent quiescent state reporting for offline CPUs 2025-07-22 17:10:50 +05:30
rust
scheduler sched_ext: Changes for v6.17 2025-07-31 16:29:46 -07:00
scsi
security hardening updates for v6.17-rc1 2025-07-28 17:16:12 -07:00
sound
sphinx sphinx: kernel_abi: fix performance regression with O=<dir> 2025-07-24 08:36:17 -06:00
sphinx-static
spi
staging
sunrpc/xdr
target
tee
timers
tools tracing tools changes for 6.17: 2025-08-01 10:23:13 -07:00
trace tracing changes for 6.17 2025-08-01 10:29:36 -07:00
translations Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
usb It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
userspace-api Input updates for v6.17-rc0 2025-08-07 07:40:01 +03:00
virt Documentation: KVM: Use unordered list for pre-init VGIC registers 2025-07-29 13:43:50 -04:00
w1
watchdog
wmi
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst