Skip to content

socket/netlink: implement NETLINK_RDMA to report copy-on-fork - #14042

Open
ayushr2 wants to merge 1 commit into
google:masterfrom
ayushr2:netlink-rdma-copy-on-fork
Open

socket/netlink: implement NETLINK_RDMA to report copy-on-fork#14042
ayushr2 wants to merge 1 commit into
google:masterfrom
ayushr2:netlink-rdma-copy-on-fork

Conversation

@ayushr2

@ayushr2 ayushr2 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

libfabric/rdma-core learn whether the host kernel does copy-on-fork for
pinned pages by querying NETLINK_RDMA's RDMA_NLDEV_CMD_SYS_GET for the
RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK attribute. When it is unset, providers such
as AWS EFA arm an abort-on-fork handler and SIGABRT the process on the first
fork() that has a registered MR (e.g. Megatron's async checkpoint save).

gVisor did not implement NETLINK_RDMA, so the query failed and every such
fork aborted. Add a NETLINK_RDMA provider that answers RDMA_NLDEV_CMD_SYS_GET
with COPY_ON_FORK=1, mirroring drivers/infiniband/core/nldev.c.

This answer is truthful because the sentry implements copy-on-fork for pinned
pages (#14031): rdmaproxy-pinned DMA pages stay stable across fork() while the
host driver keeps DMAing the original.

Depends on #14031; should be merged after it.

libfabric/rdma-core learn whether the host kernel does copy-on-fork for
pinned pages by querying NETLINK_RDMA's RDMA_NLDEV_CMD_SYS_GET for the
RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK attribute. When it is unset, providers such
as AWS EFA arm an abort-on-fork handler and SIGABRT the process on the first
fork() that has a registered MR (e.g. Megatron's async checkpoint save).

gVisor did not implement NETLINK_RDMA, so the query failed and every such
fork aborted. Add a NETLINK_RDMA provider that answers RDMA_NLDEV_CMD_SYS_GET
with COPY_ON_FORK=1, mirroring drivers/infiniband/core/nldev.c.

This answer is truthful because the sentry implements copy-on-fork for pinned
pages (PR google#14031): rdmaproxy-pinned DMA pages stay stable across fork() while
the host driver keeps DMAing the original.
@ayushr2
ayushr2 marked this pull request as ready for review August 7, 2026 21:14
@ayushr2

ayushr2 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

cc @TheCoolDinosuar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant