percpu_ref_put(9)
πΈ NAME πΈ
okay bestie, this is percpu_ref_put(9) from the Kernel API Manual β literally the page about decrementing a percpu refcount. π
β¨ SYNOPSIS β¨
void percpu_ref_put (struct percpu_ref *ref );
π ARGUMENTS π
refβ thepercpu_refto put. That's the one you're handing over to this function. π«Ά
π DESCRIPTION π
so what it does: it decrements the refcount, and if that count hits 0, it calls the release function β the one that was passed to percpu_ref_init. no cap, that's the whole vibe. β¨
β οΈ safety note, bestie: this function is safe to call as long as ref is between init and exit. outside that window? don't. π
π₯ SEE ALSO π₯
the Kernel file ./include/linux/percpu-refcount.h is right there for you, and these related pages are the whole friend group:
percpu_ref_kill(9)percpu_ref_get_many(9)percpu_ref_get(9)percpu_ref_tryget_many(9)percpu_ref_tryget(9)percpu_ref_tryget_live_rcu(9)percpu_ref_tryget_live(9)percpu_ref_put_many(9)percpu_ref_is_dying(9)
mwah π sign-off: this page lives in ./include/linux, dated October 2026, and it's percpu_ref_put(9). periodt. π
π¦ 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