rdma_restrack_sync(9)
β¨ 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 π:
rdma_restrack_init(9)rdma_restrack_clean(9)rdma_restrack_count(9)rdma_restrack_attach_task(9)rdma_restrack_set_name(9)rdma_restrack_parent_name(9)rdma_restrack_new(9)rdma_restrack_add(9)rdma_restrack_abort_del(9)rdma_restrack_get_byid(9)rdma_restrack_del(9)rdma_restrack_begin_del(9)rdma_restrack_commit_del(9)
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
- 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