Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-dm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-dm
  • Repository
Switch branch/tag
  • linux-dm
  • mm
  • memcontrol.c
Find file BlameHistoryPermalink
  • Roman Gushchin's avatar
    mm: memcontrol: flush percpu vmevents before releasing memcg · bb65f89b
    Roman Gushchin authored Aug 24, 2019
    Similar to vmstats, percpu caching of local vmevents leads to an
    accumulation of errors on non-leaf levels.  This happens because some
    leftovers may remain in percpu caches, so that they are never propagated
    up by the cgroup tree and just disappear into nonexistence with on
    releasing of the memory cgroup.
    
    To fix this issue let's accumulate and propagate percpu vmevents values
    before releasing the memory cgroup similar to what we're doing with
    vmstats.
    
    Since on cpu hotplug we do flush percpu vmstats anyway, we can iterate
    only over online cpus.
    
    Link: http://lkml.kernel.org/r/20190819202338.363363-4-guro@fb.com
    Fixes: 42a30035
    
     ("mm: memcontrol: fix recursive statistics correctness & scalabilty")
    Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
    Acked-by: default avatarMichal Hocko <mhocko@suse.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    bb65f89b