rdma_restrack_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ rdma_restrack_sync(9) ✨

okay bestie, welcome to the Kernel API Manual</> πŸ’… this one's a lil kernel function called rdma_restrack_sync, and honestly it's giving barrier realness</> β€” let's get into it 🫢


🌸 NAME 🌸

rdma_restrack_sync β€” fence concurrent netlink dumps on an entry πŸ”₯


πŸ¦‹ SYNOPSIS πŸ¦‹

void rdma_restrack_sync (struct rdma_restrack_entry *res );

πŸŽ€ ARGUMENTS πŸŽ€

  • res β€” the resource entry, bestie. that's the whole vibe. πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• β€” once this function returns, any concurrent netlink dump threads will see the current value</> of the object. no cap, they're synced up. ✨

this is useful if the object has to be changed and there is not locking</> to protect the nl side. eg for mr->pd. iykyk 😌

the way it works is genuinely iconic: it effectively destroys the object from a kref/xarray perspective</> and then immediately restores it</>. the kref is acting like a lock to barrier concurrent nl threads. slay. πŸ”’

⚠️ okay this part matters, don't skip it: callers must ensure rdma_restrack_del is not concurrently called. fr fr, do not do that. πŸ’€

🧚 SEE ALSO 🧚

kernel file ./drivers/infiniband/core/restrack.c β€” and the whole restrack bestie squad πŸ’œ:


and that's the whole page, bestie πŸŒˆπŸ’… this lil gem lives in ./drivers/infiniband/core, dated October 2026</> β€” go forth and fence those netlink dumps, you absolute main character πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from