mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[PR #430] IBSocket: post small sends inline #431
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#431
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/3FS/pull/430
Author: @alxrxs
Created: 9/28/2026
Status: 🔄 Open
Base:
main← Head:ib-inline-small-sends📝 Commits (4)
125bcf1IBSocket: post small sends inlinecf9f237IBSocket: refine the inline size limit and the QP creation fallbackf8c36ecIBSocket: try known inline limits, then step down2fdfef5IBSocket: step down only on EINVAL and reuse each device's inline size📊 Changes
4 files changed (+64 additions, -1 deletions)
View changed files
📝
src/common/net/ib/IBConnect.cc(+47 -1)📝
src/common/net/ib/IBDevice.h(+6 -0)📝
src/common/net/ib/IBSocket.cc(+5 -0)📝
src/common/net/ib/IBSocket.h(+6 -0)📄 Description
IBSocket::postSend() posts every send buffer by reference and the QP is created with max_inline_data = 0, so for a small RPC request or response the NIC first has to read the message from host memory. In a separate ping-pong microbenchmark that sends the same small RDMA write with and without IBV_SEND_INLINE, inlining cut one-way latency by about 0.43 us on Xeon 8480C hosts with ConnectX-7 and 0.89 us on EPYC 7742 hosts with ConnectX-6.
This requests 236 bytes of inline data in qpCreate(), less if the device refuses (see below), and sets IBV_SEND_INLINE in postSend() when the message fits the granted size. 236 bytes is the largest Send whose inlined WQE fits the 256-byte BlueFlame buffer of current mlx5 NICs. The 236-byte limit applies only on Mellanox/NVIDIA NICs (vendor ID 0x02c9); other devices inline up to the size they grant. The verbs API cannot report the inline limit, so devices whose driver has a fixed one try it first, by vendor ID (Intel 216, 101 or 48 depending on the irdma generation, 101 on the E810 and 48 on the X722; Alibaba eRDMA 96), and a device that refuses a size is asked for 16 bytes less each time until it accepts, down to none. Only EINVAL counts as a refusal; any other failure is reported as before. Each device remembers the size its last QP was created with, so later connections start there instead of stepping down again. With the default max_sge of 16 the send WQE stays the same size. IBSocket already posts its empty liveness-check and close writes with IBV_SEND_INLINE. Nothing on the wire changes, so old and new peers still work together.
I haven't measured 3FS itself. I compiled IBConnect.cc, IBSocket.cc, IBDevice.cc and RDMABuf.cc (clang 17, -Wall -Wextra, no warnings) but could not build the whole tree or run it.
Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.