foundations of per-cgroup memory pressure controlling.
This patch replaces all uses of struct sock fields' memory_pressure, memory_allocated, sockets_allocated, and sysctl_mem to acessor macros. Those macros can either receive a socket argument, or a mem_cgroup argument, depending on the context they live in. Since we're only doing a macro wrapping here, no performance impact at all is expected in the case where we don't have cgroups disabled. Signed-off-by:Glauber Costa <glommer@parallels.com> Reviewed-by:
Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com> CC: David S. Miller <davem@davemloft.net> CC: Eric W. Biederman <ebiederm@xmission.com> CC: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/sock.h 95 additions, 1 deletioninclude/net/sock.h
- include/net/tcp.h 2 additions, 1 deletioninclude/net/tcp.h
- net/core/sock.c 34 additions, 23 deletionsnet/core/sock.c
- net/ipv4/proc.c 3 additions, 3 deletionsnet/ipv4/proc.c
- net/ipv4/tcp_input.c 6 additions, 6 deletionsnet/ipv4/tcp_input.c
- net/ipv4/tcp_ipv4.c 2 additions, 2 deletionsnet/ipv4/tcp_ipv4.c
- net/ipv4/tcp_output.c 1 addition, 1 deletionnet/ipv4/tcp_output.c
- net/ipv4/tcp_timer.c 1 addition, 1 deletionnet/ipv4/tcp_timer.c
- net/ipv6/tcp_ipv6.c 1 addition, 1 deletionnet/ipv6/tcp_ipv6.c
Loading
Please register or sign in to comment