objpool_fini(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


mwah πŸ’‹ source/version: ./include/linux; date: October 2026; page: objpool_fini(9) β€” bye bestie 🫢

πŸ“¦ where this page comes from