Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • include
  • linux
  • slub_def.h
Find file BlameHistoryPermalink
  • Roman Gushchin's avatar
    mm: memcg/slab: use a single set of kmem_caches for all allocations · 10befea9
    Roman Gushchin authored Aug 06, 2020
    Instead of having two sets of kmem_caches: one for system-wide and
    non-accounted allocations and the second one shared by all accounted
    allocations, we can use just one.
    
    The idea is simple: space for obj_cgroup metadata can be allocated on
    demand and filled only for accounted allocations.
    
    It allows to remove a bunch of code which is required to handle kmem_cache
    clones for accounted allocations.  There is no more need to create them,
    accumulate statistics, propagate attributes, etc.  It's a quite
    significant simplification.
    
    Also, because the total number of slab_caches is reduced almost twice (not
    all kmem_caches have a memcg clone), some additional memory savings are
    expected.  On my devvm it additionally saves about 3.5% of slab memory.
    
    [guro@fb.com: fix build on MIPS]
      Link: http://lkml.kernel.org/r/20200717214810.3733082-1-guro@fb.com
    
    
    
    Suggested-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
    Link: http://lkml.kernel.org/r/20200623174037.3951353-18-guro@fb.com
    
    
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    10befea9
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7