Linux: network: sysctl: tcp_mem
文章目录
- tcp_mem 说明
- 初始化
- sk_prot_mem_limits
- trace event
- __sk_mem_raise_allocated
- 判断逻辑在
- pressure mode
- LINUX_MIB_TCPMEMORYPRESSURES
- tcp send to
tcp_mem 说明
tcp_mem - vector of 3 INTEGERs: min, pressure, max
min: below this number of pages TCP is not bothered about its memory appetite.
pressure: when amount of memory allocated by TCP exceeds this number of pages, TCP moderates its memory consumption and enters memory pressure mode, which is exited when memory consumption falls under “min”.
max: number of pages allowed for queueing by all TCP sockets.
Defaults are calculated at boot time from amount of available memory.
这个参数是三元值,第一个min是系统给TCP分配的最小页数;pressure,如果分配超过这个值,就进入一种pressure的状态。如果达到max,就会分配失败。
但是这里没有写进入pressure 模式,会做什么操作。所以需要自己看代码来学。
初始化
这个参数的初始化,和现有内存的量有关