Following the August 16 release of Linux 7.2, the merge window for version 7.3 has opened, and the most impactful memory and scheduling optimizations submitted so far come almost entirely from Chinese engineers. Notably, patches from ByteDance, ZTE, and Xiaomi have been accepted into the mainline, targeting three critical areas: scheduling latency, memory management, and compressed memory.
ByteDance engineer Chuyi Zhou identified that the kernel's smp_call_function*() routine disables preemption entirely while waiting for other CPUs to complete inter-processor interrupts (IPIs). On a 16-core machine, this IPI wait can push scheduling latency to 17 milliseconds, which is a fatal tail-latency issue for real-time network frameworks like DPDK. The fix from ByteDance is elegant: the CPUs being waited on are recorded in each task's CPU mask, turning the wait information into task-local data and allowing preemption to be re-enabled before the wait. Testing shows DPDK's worst-case latency drops from approximately 17ms to about 1.5ms, a reduction of roughly 90%.
ZTE engineer Xu Xin uncovered a severe performance bottleneck in the KSM reverse-mapping function rmap_walk_ksm(), where the worst-case hold time for an internal lock could reach 705 milliseconds. This caused applications to freeze for hundreds of milliseconds, leading to container timeouts. The trigger is common: JVMs allocating heaps with mmap and repeatedly calling mprotect for GC barriers. After the ZTE team's optimization, the worst-case lock hold time dropped from 705ms to a mean of 1.44ms and a peak of 1.67ms, an improvement of approximately 490 times.
Xiaomi engineer Wenchao Hao focused on the zs_free() lock contention in the zsmalloc memory allocator, the core allocator for zRAM and Zswap, which is vital for Android phones and older devices under memory pressure. After the optimization, concurrent memory release on a Raspberry Pi 4B is 1.83 times faster, while a 20-core Intel server sees a 1.4 times speedup.
Given the kernel community's typical cadence of one Long-Term Support (LTS) release per year, 7.3 is a strong candidate for this year's LTS designation. If selected, the performance patches from ByteDance, ZTE, and Xiaomi will be maintained by major distributions for several years.
For reprints, please credit the original source. Editor: Hong Cha.