linux kernel

linux kernel

SL[AUO]B: Kernel memory allocator design and philosophy

1w ago
SOURCE  

Description

Christopher Lameter http://lca2015.linux.org.au/schedule/30035/view_talk An introduction to the design and ideas behind the 3 small object memory allocators in the Linux kernel. SLAB is the original memory allocator based on ideas also used for Solaris. SLOB is a based K&R allocator originating even further in the past. SLUB is an allocator written for minimal queuing focusing on low instruction overhead in the fast paths instead. Slab allocators are providing basic memory allocation to kernel code. Often these allocations may occur in performance sensitive code (especially in the network and storage layer). Kernel performance is significantly affected by the slab allocators architecture and features. The talk provides an overview of the slab allocator services available in the Linux kernel and covers the most frequent use cases. The approaches used in the three slab allocators (SLAB, SLUB, SLOB) are compared and ways to get the maximum performance out of each of them are presented. Lastly a series of common gotchas when using slab allocators are reviewed followed by an open discussion on issues and the future of the slab subsystems.