Summary
In this chapter, we continued where we left off in the previous chapter. We covered, in a good amount of detail, how you can create and use your own custom slab caches (useful when your driver or module very frequently allocates and frees a certain data structure). We then provided an overview of available kernel debug techniques for debugging memory issues. Next, we learned about and used the kernel vmalloc()
API (and friends). With the wealth of memory APIs available, how do you select which one to use in a given situation? We covered this important concern with a useful decision chart and table. We then delved into an understanding of the kernel page reclaim procedures; this discussion covered the zone watermarks, the kswapd kernel thread(s), the new MG-LRU lists, and the DAMON data access monitoring technology.
We then went into what exactly the kernel’s dreaded OOM killer (and the systemd-oomd
daemon) component is and how to work with it.
As I have mentioned...