]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: enable accounting for inet_bin_bucket cache
authorVasily Averin <vvs@virtuozzo.com>
Mon, 19 Jul 2021 10:44:37 +0000 (13:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jul 2021 13:00:38 +0000 (06:00 -0700)
commit21e4027c2052620d6750342958291aca4c531f86
tree3f49a521075ec7638f10748023cdc17c963956c6
parent62c491e0a115838dc2d2fde20d7632b0853baded
memcg: enable accounting for inet_bin_bucket cache

net namespace can create up to 64K tcp and dccp ports and force kernel
to allocate up to several megabytes of memory per netns
for inet_bind_bucket objects.

It makes sense to account for them to restrict the host's memory
consumption from inside the memcg-limited container.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/proto.c
net/ipv4/tcp.c