kmem_cache not showing in /proc/slabinfo

becher.jannik at gmail.com becher.jannik at gmail.com
Tue Sep 27 04:53:00 EDT 2016


Hi All,

I played a little bit around with kmem_cache_alloc() and
kmem_cache_create() and figured out that it only appears
in /proc/slabinfo if I reserve a specific amount of memory.
Isn't it always preferable to precache space for often used
structs even for small structs?

I'm not sure whether I understood it right how it works.
But how does the kernel know for how many structs he should
preallocate memory?

Best regards
Jannik Becher



More information about the Kernelnewbies mailing list