Skip to content
Snippets Groups Projects
Select Git revision
1 result Searching

memcontrol.c

Blame
  • Forked from hardware-enablement / Rockchip upstream enablement efforts / linux
    Source project has a limited visibility.
    • Glauber Costa's avatar
      e1aab161
      socket: initial cgroup code. · e1aab161
      Glauber Costa authored
      
      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: default avatarGlauber Costa <glommer@parallels.com>
      Reviewed-by: default avatarKAMEZAWA 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: default avatarDavid S. Miller <davem@davemloft.net>
      e1aab161
      History
      socket: initial cgroup code.
      Glauber Costa authored
      
      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: default avatarGlauber Costa <glommer@parallels.com>
      Reviewed-by: default avatarKAMEZAWA 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: default avatarDavid S. Miller <davem@davemloft.net>
    yurex.c 12.88 KiB