The "TCP socket buffers" entry in the memory.stat description leaves the impression that the charge tracks in-flight packet buffers. Since the budget-charging rework, a socket is instead charged its full established memory budget (send buffer, receive buffer and SO_RESERVE_MEM reservation) when the budget is created or resized, and the charge is returned when the budget shrinks or the socket is closed. Say so.
Assisted-by: opencode:glm-5.3 Signed-off-by: Cai Xinchen <[email protected]> --- Documentation/admin-guide/cgroup-v2.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 8d2603751c51..4f26a459cfdc 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1309,7 +1309,11 @@ following types of memory usages are tracked. - Kernel data structures such as dentries and inodes. -- TCP socket buffers. +- TCP socket buffers. These are charged upfront for the socket's + established memory budget (send buffer, receive buffer and + SO_RESERVE_MEM reservation) when the budget is created or resized, + and returned when the budget shrinks or the socket is closed; the + charge is not tied to per-packet buffer usage. The above list may expand in the future for better coverage. -- 2.18.0.huawei.25

