Skip to content

Commit a8458f8

Browse files
ccie18643claude
andcommitted
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

File tree

docs/refactor/host_refinements_backlog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,14 @@ self._signal_readable()
358358
the `SO_*BUF` options to work. **Global memory-pressure accounting
359359
(`tcp_mem`) is a documented non-goal** (kernel-memory management a
360360
userspace stack does not own).
361+
- **Full implementation plan scoped:** `docs/refactor/tcp_buffer_autotuning.md`
362+
— Track R (receive DRS: R1 receiver-RTT estimator → R2 `RcvSpaceState`
363+
R3 trigger → R4 grow policy) and Track S (send auto-tuning: S1 auto bound →
364+
S2 expand policy), both actuators reusing the shipped Tier-1 primitives
365+
(`grow_rcv_wnd_max`, the `_effective_sndbuf()` gate). Registers the Tier-2
366+
`tcp.rmem`/`tcp.wmem` triples + `tcp.moderate_rcvbuf`; the load-bearing
367+
decision is pairing Track S with a small initial send default (§2/§7). No
368+
code yet.
361369

362370
### R4 — IPv6 per-socket source filters = MLDv2 SSM track — DONE (P1-P5 shipped)
363371

0 commit comments

Comments
 (0)