Commit a8458f8
docs(refactor): scope TCP buffer auto-tuning (Tier 3)
Add docs/refactor/tcp_buffer_autotuning.md — the implementation plan for
the separately-split Tier-3 buffer-accounting item (Linux DRS +
send-buffer auto-tuning), grounded in the shipped Tier-1 primitives.
Two tracks, symmetric to Tier-1's A/B:
- Track R (receive DRS, tcp_rcv_space_adjust): R1 receiver-side RTT
estimator (the prerequisite — sender SRTT is unpopulated on a pure
receiver; reuse the RFC 7323 TSecr echo), R2 RcvSpaceState + cumulative
copied-bytes counter, R3 once-per-RTT trigger in receive(), R4 the BDP
grow formula clamped at tcp.rmem.max. Actuator is the existing grow-only
grow_rcv_wnd_max().
- Track S (send auto-tuning, tcp_sndbuf_expand): S1 a grow-only _sndbuf_auto
folded into _effective_sndbuf(), S2 the 2*cwnd*mss expand policy fired
from the ACK path. Actuator is the existing _charge_tx_buffer gate.
Records the load-bearing decision (auto-tuning assumes a small initial
buffer that grows, but Tier-1 chose large static defaults — Track S must
land paired with adopting a small tcp.wmem.default or it is cosmetic),
the sysctl set (tcp.rmem/tcp.wmem triples + tcp.moderate_rcvbuf, subsuming
that slice of Tier-2), the SOCK_*BUF_LOCK ⇔ option-unset lock reusing the
Tier-1 explicit-vs-None distinction, the no-GIL single-writer analysis for
every added field, the test strategy, and the recommended ordering. No
code.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e5c1780 commit a8458f8
2 files changed
Lines changed: 448 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
361 | 369 | | |
362 | 370 | | |
363 | 371 | | |
| |||
0 commit comments