objpool_fini(9)
β¨ objpool_fini(9) β¨
okay so this page comes from the Kernel API Manual, and it's all about objpool_fini β the deref-the-object-pool era. bestie, let's get into it π
πΈ NAME πΈ
objpool_fini β deref object pool (also releasing unused objects) π«Ά
β¨ SYNOPSIS β¨
void objpool_fini (struct objpool_head *pool );
π ARGUMENTS π
poolβ the object pool to be dereferenced. that's the whole argument, no cap π
π DESCRIPTION π
okay so here's the vibe: objpool_fini is gonna try to release all remained free objects, and then it drops an extra reference of the objpool. that's the main character move β¨
If all objects are already returned to objpool β the so called synchronous use cases β then the objpool itself will be freed together. slay, cleanup complete π
But if there are still outstanding objects β asynchronous use cases, such like blockable kretprobe β the objpool won't be released until all the outstanding objects are dropped. not me warning you: the caller must assure there are no concurrent objpool_push on the fly. π¨
Normally RCU is being required to make sure all ongoing objpool_push must be finished before calling objpool_fini, so does test_objpool, kretprobe or rethook. so yeah, that's the requirement before you call β iykyk π¦
π¦ SEE ALSO π¦
Kernel file ./include/linux/objpool.h is right there, and these are the besties in the same friend group:
struct objpool_slot(9)struct objpool_head(9)objpool_init(9)objpool_pop(9)objpool_push(9)objpool_drop(9)objpool_free(9)
mwah π source/version: ./include/linux; date: October 2026; page: objpool_fini(9) β bye bestie π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms