dequeue_tid_waiter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dequeue_tid_waiter(9) β€” like, the Kernel API Manual era πŸŽ€

okay so bestie, we're in the Kernel API Manual today and this one's about pulling a qp out of a list. yes it's a kernel function, no it's not scary, come sit with me πŸ’–


✨ NAME ✨

dequeue_tid_waiter β€” dequeue the qp from the list. that's it, that's the whole vibe 🫢


🌸 SYNOPSIS 🌸

void dequeue_tid_waiter (struct hfi1_ctxtdata *rcd , struct tid_queue
*queue , struct rvt_qp *qp );

look at that signature, it's giving "three args and zero thoughts" πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rcd β€” the receive context. the main character of this whole situation ngl
  • queue β€” the queue we're operating on. the venue, if you will πŸŽ€
  • qp β€” the qp to remove from the wait list. the one getting un-invited from the group chat πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

so this routine removes the indicated qp from the wait list if it is there (conditional queen behavior, we love to see it ✨).

the timing? highkey matters. this should be done after the hardware flow and tid array resources have been allocated. like, resources first, dequeue second, no skipping steps bestie 😭

🚨 lock check, no cap: must hold the qp s_lock and the rcd exp_lock. both. not one, both. iykyk πŸ’…

and the reason for the s_lock? it assumes the s_lock to protect the s_flags field and to reliably test the HFI1_S_WAIT_TID_SPACE flag. so yeah, the lock isn't decorative, it's doing real work fr fr πŸ”₯


🌈 SEE ALSO 🌈

in the kernel file ./drivers/infiniband/hw/hfi1/tid_rdma.c, and also go read up on:

that's the whole reading list, put it in your notes app πŸ“πŸ’–


and that's a wrap, bestie! this iconic little page lives in ./drivers/infiniband/hw/hfi1, dated October 2026, and it's still signed off as dequeue_tid_waiter(9) β€” slay, stay hydrated, and always hold both locks πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from