News report
Linux ZRAM Rework Splits Read and Write Compression Streams
A proposed Linux ZRAM redesign separates compression and decompression streams to reduce priority inversion and cut per-CPU memory overhead.
On this page
ZRAM's compression contexts are being redesigned
Sergey Senozhatsky of Google's Chrome/Chromium team has posted a Linux kernel patch series that reworks ZRAM's zcomp compression layer. The central change separates per-CPU read and write streams instead of making compression and decompression share the same stream and lock.
The patch rationale targets a priority-inversion case in preemptible ZRAM: a higher-priority reader can preempt a writer that already holds the shared stream lock, then block waiting for that same lock. Because decompression and compression use independent buffers, the proposal gives reads and writes separate contexts so they no longer compete for one stream.
| Area | Current/shared-stream issue | Proposed behavior |
|---|---|---|
| Read vs. write contexts | Compression and decompression share per-CPU streams | Separate per-CPU read and write streams |
| Scheduling | A reader can be blocked behind a preempted writer holding the stream lock | Independent streams remove that specific lock contention |
| Recompression | Secondary compression contexts are allocated per CPU | A singleton compression context can serve serialized recompression while decompression remains per CPU |
| Memory overhead | Secondary contexts multiply with CPU count | Some backends/configurations can save tens to hundreds of KB per context/per CPU |
The redesign can also reduce memory overhead
The final part of the series changes how secondary streams used for recompression are allocated. Recompression is serialized by the device lock, so the proposal can use one compression context for that work while retaining per-CPU decompression contexts for concurrent reads.
Senozhatsky says the resulting savings range from double-digit to triple-digit kilobytes per context and per CPU in some configurations, with backends such as zstd, deflate and lz4hc called out as examples where the reduction can be notable. On machines with many CPU cores, per-CPU savings can accumulate, but the exact total depends on the compressor and configuration.
Performance claims remain preliminary
The patch author reports noticeable improvements in synthetic testing after decoupling read and write streams. That result is useful evidence for the mechanism, but it is not a universal application-performance claim: real-world impact will depend on workload, memory pressure, compressor choice, CPU topology and how heavily ZRAM is exercised.
The work was posted for review on October 5, 2026. It is therefore proposed upstream kernel development rather than functionality users should assume is present in their current distribution kernel. The currently listed mainline kernel is Linux 7.3-rc6, so this story should not be read as a released Linux 7.3 feature.
Sources
Primary and technical sources
These sources support the reporting and analysis above. Current stories are updated when later evidence materially changes the facts.
01 Phoronix
Linux's ZRAM Reworked For Greater Memory Savings, Better Performance02 Linux kernel mailing list / Sergey Senozhatsky
ZRAM zcomp redesign patch series, October 5, 202603 Kernel.org
Linux kernel releases
Related
Continue from here
Useful next steps selected from the same technical reference and publication system.
Compatibility & upgrades
Laptop RAM Upgrade Compatibility: SODIMM, Soldered Memory, DDR4/DDR5, Capacity, and Mixed Modules
Check whether laptop RAM is actually upgradeable, then verify SODIMM versus soldered memory, DDR generation, slots, capacity, speed, and exact-model limits before buying.
Technical guide
CPU Out-of-Order Execution Explained: Dependencies, Scheduling, Reorder Buffers, and Retirement
Learn how modern CPUs find instruction-level parallelism, rename registers, schedule ready work out of order, and still retire results in program order.
Tool
DDR Memory Latency Calculator
Convert DDR data rate and CAS latency cycles into CAS timing in nanoseconds.
Technical guide
Page Faults Explained: Hard vs Soft Faults, Virtual Memory, and Disk I/O
Understand page faults in Windows and modern CPUs, including hard vs soft faults, demand paging, working sets, disk I/O, protection faults, and why page faults are not automatically a RAM problem.