SLUB Adapted To Be Real-Time Linux Compatible (PREEMPT_RT)

Written by Michael Larabel in Linux Kernel on 9 September 2021 at 12:00 AM EDT. 4 Comments
LINUX KERNEL
One of the nice low-level improvements we've seen with Linux 5.15 is a number of pieces falling into place in the quest of upstreaming the real-time (RT) patches for Linux. The latest merge makes SLUB RT-compatible.

The big RT addition for Linux 5.15 was the PREEMPT_RT locking code being merged and that representing a bulk of the previously outstanding real-time patches needing to be upstreamed. That is a big milestone albeit not across the finish line yet and more of the kernel code continues to be adapted to make it compatible with RT configurations.

Linux's SLUB memory management code on Wednesday saw RT support merged. The SLUB allocation code is now considered "fully PREEMPT_RT compatible" and so far has been found to not introduce any performance regressions for RT or non-RT kernel configurations -- besides the expected RT tradeoff of some throughput regressions due to preemption improvements through the RT mutex.

The merge comment notes, "This series was initially inspired by Mel's pcplist local_lock rewrite, and also interest to better understand SLUB's locking and the new primitives and RT variants and implications. It makes SLUB compatible with PREEMPT_RT and generally more preemption-friendly, apparently without significant regressions, as the fast paths are not affected."

More details on the SLUB changes for Linux 5.15 via the merge.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week