Following recent discussions by Linux kernel developers around integrating swap cache and swap maps functionality with the swap allocator, Swap Table was born. With Swap Tables the hope is for lower memory use, higher performance, dynamic swap allocation and growth, greater extensibility, and other improvements over the existing swap code within the Linux kernel.
Engineer Kairui Song with Tencent posted the Swap Table patch series today for implementing the design ideas discussed in recent months by kernel developers. The results are very exciting so let’s get straight to it:
“With this series, swap subsystem will have a ~20-30% performance gain from basic sequential swap to heavy workloads, for both 4K and mTHP folios. The idle memory usage is already much lower, the average memory consumption is still the same or will also be even lower (with further works). And this enables many more future optimizations, with better defined swap operations.”
Heck yes! This sounds great. The patches also clean-up and address vaerious historical issues with the SWAP subsystem.
The set of 27 patches for Swap Tables is very interesting and is now out for review via this patch series. Hopefully it won’t be too long before seeing Swap Tables or some evolution of it within the mainline Linux kernel.