]> git.baikalelectronics.ru Git - kernel.git/commit
socket: initial cgroup code.
authorGlauber Costa <glommer@parallels.com>
Sun, 11 Dec 2011 21:47:03 +0000 (21:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Dec 2011 00:04:10 +0000 (19:04 -0500)
commite76ec9cff8b6c76d9d1e573fb4904c11c7bfd914
treed0bcdf7a34a34020079238027b431ffc6dece307
parent3a062d249a076956ddba6ea0684248150f300289
socket: initial cgroup code.

The goal of this work is to move the memory pressure tcp
controls to a cgroup, instead of just relying on global
conditions.

To avoid excessive overhead in the network fast paths,
the code that accounts allocated memory to a cgroup is
hidden inside a static_branch(). This branch is patched out
until the first non-root cgroup is created. So when nobody
is using cgroups, even if it is mounted, no significant performance
penalty should be seen.

This patch handles the generic part of the code, and has nothing
tcp-specific.

Signed-off-by: Glauber Costa <glommer@parallels.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujtsu.com>
CC: Kirill A. Shutemov <kirill@shutemov.name>
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>
Documentation/cgroups/memory.txt
include/linux/memcontrol.h
include/net/sock.h
mm/memcontrol.c
net/core/sock.c