resilient_q...ock_slowpath(9)
π NAME π
resilient_queued_spin_lock_slowpath β bestie, this is the function that actually acquires the queued spinlock π
And yeah, the manual page itself is titled resilient_q...ock_slowpath(9) because someone in the Kernel API Manual department got a little βοΈ truncation-happy, but the real one is spelled out above, no cap.
β¨ SYNOPSIS β¨
int __lockfunc resilient_queued_spin_lock_slowpath (rqspinlock_t *lock ,
u32 val );
π ARGUMENTS π
lockβ pointer to the queued spinlock structure π«Ά like, that's the thing you're trying to lock, obviously.valβ the current value of the queued spinlock's 32-bit word. Yes, it's au32. Yes, it's the value right now. Keep up bestie π¦
π RETURN π
0β slay, the lock was acquired successfully π-EDEADLKβ lock acquisition failed because of AA/ABBA deadlock π the drama of it all.-ETIMEDOUTβ lock acquisition failed because of a timeout π it just took too long and gave up.
π¦ DESCRIPTION π¦
Ok so here's the whole vibe. The tuple you're looking at the entire time is (queue tail, pending bit, lock value) and it's genuinely giving main character energy:
(queue tail, pending bit, lock value)
fast : slow : unlock :
: uncontended (0,0,0) -:--> (0,0,1) ------------------------------:-->
(*,*,0) : | ^--------.------. / : : v
| : pending : (0,1,1) +--> (0,1,0)
| : : | ^--' | | : : v
| | : uncontended : (n,x,y) +--> (n,0,0) --'
| : queue : | ^--' | : :
v | : contended : (*,x,y)
+--> (*,0,0) ---> (*,0,1) -' : queue : ^--'
:
Lowkey an art piece. Highkey a state machine. Read it, live it, love it π
β SEE ALSO β
- Kernel file
./kernel/bpf/rqspinlock.cβ go read the source if you want the full lore, iykyk π
That's the whole page bestie, hope it slaps π«Ά β it's from the Kernel API Manual, coming to you courtesy of ./kernel/bpf, dated October 2026 πβ¨
π¦ 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