From d71e19fdb7824530f8af7a41dfc134ddd5c2550e Mon Sep 17 00:00:00 2001 From: Dongsheng Yang Date: Tue, 12 Aug 2025 16:24:17 +0800 Subject: [PATCH 1/2] Fill in mail and code for pcache v5 --- pcache/pcache_index.md | 1 + pcache/pcache_v5.md | 51 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 pcache/pcache_v5.md diff --git a/pcache/pcache_index.md b/pcache/pcache_index.md index 5da3ffe..2132302 100644 --- a/pcache/pcache_index.md +++ b/pcache/pcache_index.md @@ -7,3 +7,4 @@ layout: default - [PCache RFC](pcache_RFC.md) - [PCache RFC V2](pcache_RFC_V2.md) - [PCache v4](pcache_v4.md) +- [PCache v5](pcache_v5.md) diff --git a/pcache/pcache_v5.md b/pcache/pcache_v5.md new file mode 100644 index 0000000..35ce1b6 --- /dev/null +++ b/pcache/pcache_v5.md @@ -0,0 +1,51 @@ +# PCache v5 + +This document summarizes **dm-pcache** patch set v5. It is based on v6.16 of +the Linux kernel and contains the latest updates and testing results for the +persistent cache target. + +## Mail +> Hi Mikulas, +> This is V5 for dm-pcache, please consider merging. +> +> As you requested, I've squashed these patches into a single patch based on +> v6.16. If anything needs tweaking while merging, feel free to modify it +> directly. I can also send a rebased version on top of the linux-dm branch if +> you prefer. +> +> This patch has been tested extensively. Once it's merged into linux-dm I'll +> keep running ongoing tests against dm-6.18. + +## Code +https://github.com/DataTravelGuide/linux/tree/pcache_v5 + +## Changelog + +### V5 from V4 +- Fix `get_n_vecs()` bug when the buffer is not page‑aligned; use + `bio_add_max_vecs()` instead. +- Use `kvcalloc()` for allocations larger than 32,768 bytes. +- For mempool allocations, try `GFP_NOWAIT` first and fall back to + `GFP_NOIO`. + +## Testing +The following tests were executed against dm-pcache v5: + +1. **dtg-tests for pcache** – includes dmsetup operations, failslab, + fault injection (`fail_make_request`) and backing device delay tests, + plus xfstests (`generic/rw`) under various parameters. +2. **Striped pmem as cache device** – dtg-tests suite executed with a + striped pmem configuration. +3. **KASAN and memleak modes** – all of the above tests run with KASAN + and memory leak detection enabled. +4. **gcov coverage** – reported 100% function coverage and 90%+ line + coverage; remaining uncovered code includes `BUG()` lines and + difficult‑to‑reach error paths. The `mempool_alloc` path with + `GFP_NOIO` was exercised. + +## Results +- [dtg-tests (virtio)](https://datatravelguide.github.io/dtg-blog/pcache/pcache_v5_result_virtio/results.html) +- [dtg-tests (striped pmem)](https://datatravelguide.github.io/dtg-blog/pcache/pcache_v5_result_ram/results.html) +- [KASAN & memleak tests](https://datatravelguide.github.io/dtg-blog/pcache/pcache_v5_result_kasan/results.html) +- [Coverage report](https://datatravelguide.github.io/dtg-blog/pcache/pcache_cov_v5/dm-pcache/index.html) + From b5e7e320ae4856ef26e0c15e8772311d4c866902 Mon Sep 17 00:00:00 2001 From: Dongsheng Yang Date: Tue, 12 Aug 2025 16:34:16 +0800 Subject: [PATCH 2/2] link pcache v5 cover letter --- pcache/pcache_v5.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcache/pcache_v5.md b/pcache/pcache_v5.md index 35ce1b6..d586d34 100644 --- a/pcache/pcache_v5.md +++ b/pcache/pcache_v5.md @@ -16,6 +16,8 @@ persistent cache target. > This patch has been tested extensively. Once it's merged into linux-dm I'll > keep running ongoing tests against dm-6.18. +[Full cover letter on dm-devel](https://marc.info/?l=dm-devel&m=175498716132537) + ## Code https://github.com/DataTravelGuide/linux/tree/pcache_v5