percpu_ref_put_many(9)
π NAME β percpu_ref_put_many(9)
Okay so welcome to the percpu_ref_put_many(9) page from the Kernel API Manual, bestie. This one is literally about decrementing a percpu refcount, and itβs giving βput those references backβ energy. π
β¨ SYNOPSIS β¨
void percpu_ref_put_many (struct percpu_ref *ref , unsigned long nr );
π«Ά ARGUMENTS π«Ά
refβ thepercpu_refto put. Thatβs the main character here, no cap. πnrβ the number of references to put. Like, how many are we dropping? π₯
πΈ DESCRIPTION πΈ
So what it does: decrement the refcount, and if it hits 0, call the release function β and yes, thatβs the release function that was passed to percpu_ref_init. Periodt. π
Safety vibe check: this function is safe to call as long as ref is between init and exit. Thatβs the whole condition, bestie β donβt skip it. π¨
π SEE ALSO π
Kernel file ./include/linux/percpu-refcount.h, plus all these iconic little functions:
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(9)percpu_ref_is_dying(9)
Cute sign-off: source/version ./include/linux, date October 2026 β percpu_ref_put_many(9) π
π¦ 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