Object caches

The slab allocator provides function interfaces for setting up slab caches, which can be owned by a kernel service or a subsystem. Such caches are considered private since they are local to kernel services (or a kernel subsystem) like device drivers, file systems, process scheduler, and so on. This facility is used by most kernel subsystems to set up object caches and pool intermittently needed data structures. Most data structures we've encountered so far (since Chapter 1, Comprehending Processes, Address Space, and Threads) including process descriptor, signal descriptor, page descriptor, and so on are maintained in such object pools. The pseudo file /proc/slabinfo shows the status of object caches:

# cat /proc/slabinfo 

Get Mastering Linux Kernel Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.