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