Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

New Patches For Linux's Zswap Show Major Improvements

Дата публикации: 07-10-2026 00:56:04

Amid multiple ongoing innovations being pursued in the Linux memory management space amid sky high RAM prices, a new patch series posted on Monday aim to enhance the Zswap performance for this compressed RAM cache for swap pages...

Основное содержимое страницы с новостью.

LINUX KERNEL

Amid multiple ongoing innovations being pursued in the Linux memory management space amid sky high RAM prices, a new patch series posted on Monday aim to enhance the Zswap performance for this compressed RAM cache for swap pages.

Linux developer Usama Arif posted the set of two patches for Zswap in working to reduce request contention on loads for Zswap. Following similar work done to zRAM, the Zswap code is being adapted to address the current shortcoming of stores and loads sharing a per-CPU acomp request and mutex. This current handling is ultimately proving to be a bottleneck while the two patches help in reducing contention on loads.

Usama Arif explained further in the patch cover letter:

"Stores and loads share a per-CPU acomp request and mutex. A low-priority store can be preempted right after the compressor drops its stream lock, while it still holds the zswap mutex, and a higher-priority load on that CPU then waits for the store to run again. This follows the work from Sergey Senozhatsky's zram series which splits it for the same reason.

Patch 1 gives compression and decompression separate requests, waits and mutexes, so loads no longer wait for stores, though they can still wait for each other. Patch 2 decompresses with an on-stack request when the algorithm is synchronous and needs no request context, which covers all in-tree software compressors, so those loads take no zswap lock. Asynchronous algorithms keep the per-CPU request and mutex. For software compressors the series allocates the same number of requests as before; each per-CPU context grows by 72 bytes, and the load path is about 270 bytes deeper on x86-64."

What's impressive are the end results:

better zswap

Usama explained further with the patch series:

"The numbers below are the slowest read per run, as a median (min-max) of 5 runs. Each run is 12 seconds in a zstd VM with lazy preemption, vm.page-cluster=0 and swap on /dev/ram0. With 1 vCPU, four nice +10 workers page memory out and read it back while a nice 0 task spins. A nice -19 reader pages out its own buffer and measures how long each read of it takes. With 8 vCPUs there are 16 workers, 8 spinning tasks and 8 readers.

Before series (ms) With series (ms)
1 vCPU 22.3 (21.6-22.6) 0.97 (0.72-1.4)
8 vCPUs 314 (97-2542) 7.0 (5.0-98)

Reads over 10 ms fell from 26-35 per run to none with 1 vCPU, and from 3-18 per run to at most one with 8 vCPUs. The benchmark and test programs were written with the help of an LLM."

Overall this looks to be a very nice improvement to Zswap that is now under review on the Linux kernel mailing list.

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Linux's ZRAM Reworked For Greater Memory Savings, Better Performance06.7805-10-2026
2Meta Developing Compressed RAM "CRAM" For Linux: Better Than ZRAM & Zswap07.4306-10-2026
3Qualcomm Posts QPaCE Linux Driver Code For Faster ZRAM On Newest SoCs09.1507-10-2026
4Linux Patches Show Promising Results For Lower Latency Of Short Slice Tasks06.5503-10-2026
5Linux Kernel's LZ4 Compression Code Being Resynced For Better Performance & Cleanliness09.3127-09-2026
6Intel Delivers A Significant Memory Hotplugging Performance Optimization For Linux04.5227-09-2026
7Microsoft Updates Its WSL2 Linux Kernel With DXGKRNL Improvement, More Features Enabled012.2907-10-2026
8Large Folios Able To Deliver Big Performance Gains For FUSE With Linux 7.4014.2829-09-2026
9AMD Ryzen Zen 6 CPU Power Values Being Further Tuned For Linux011.8129-09-2026
10Auto-CPUFreq 3.2 Adds Configurable HWP Dynamic Boost, Platform Profile Reporting019.4105-10-2026

Классификация: Пресс-релизы. Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 7.19. Источник: www.phoronix.com.