Commit e1aab161 authored by Committed by David S. Miller
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 <email@example.com> Reviewed-by: KAMEZAWA Hiroyuki <firstname.lastname@example.org> CC: Kirill A. Shutemov <email@example.com> CC: David S. Miller <firstname.lastname@example.org> CC: Eric W. Biederman <email@example.com> CC: Eric Dumazet <firstname.lastname@example.org> Signed-off-by: David S. Miller <email@example.com>
Showing with 235 additions and 17 deletions