lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v3 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations
    From
    Date
    On 4/22/20 10:47 PM, Roman Gushchin wrote:
    > 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.
    >
    > Suggested-by: Johannes Weiner <hannes@cmpxchg.org>
    > Signed-off-by: Roman Gushchin <guro@fb.com>

    Reviewed-by: Vlastimil Babka <vbabka@suse.cz>

    However, as this series will affect slab fastpaths, and perhaps especially this
    patch will affect even non-kmemcg allocations being freed, I'm CCing Jesper and
    Mel for awareness as they AFAIK did work on network stack memory management
    performance, and perhaps some benchmarks are in order...

    \
     
     \ /
      Last update: 2020-05-26 16:57    [W:4.020 / U:0.700 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site