Display maximum tcp memory allocation in kmem cgroup
authorGlauber Costa <glommer@parallels.com>
Sun, 11 Dec 2011 21:47:09 +0000 (21:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Dec 2011 00:04:11 +0000 (19:04 -0500)
commit0850f0f5c54261a6236f013e8bac154bcce424d6
treeb35c273a600f29b971c92bbc7c3ae8ad1f133c28
parentffea59e50494198a0db4d6ad8f6721b8fd994f65
Display maximum tcp memory allocation in kmem cgroup

This patch introduces kmem.tcp.max_usage_in_bytes file, living in the
kmem_cgroup filesystem. The root cgroup will display a value equal
to RESOURCE_MAX. This is to avoid introducing any locking schemes in
the network paths when cgroups are not being actively used.

All others, will see the maximum memory ever used by this cgroup.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_memcontrol.c