Skip to content
  • Vlastimil Babka's avatar
    mm, slub: remove redundant unfreeze_partials() from put_cpu_partial() · 9e79bf91
    Vlastimil Babka authored
    Commit d6e0b7fa ("slub: make dead caches discard free slabs immediately")
    introduced cpu partial flushing for kmemcg caches, based on setting the target
    cpu_partial to 0 and adding a flushing check in put_cpu_partial().
    This code that sets cpu_partial to 0 was later moved by c9fc5864 ("slab:
    introduce __kmemcg_cache_deactivate()") and ultimately removed by 9855609b
    ("mm: memcg/slab: use a single set of kmem_caches for all accounted
    allocations"). However the check and flush in put_cpu_partial() was never
    removed, although it's effectively a dead code. So this patch removes it.
    
    Note that d6e0b7fa
    
     also added preempt_disable()/enable() to
    unfreeze_partials() which could be thus also considered unnecessary. But
    further patches will rely on it, so keep it.
    
    Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    9e79bf91