• Linus Torvalds's avatar
    Merge tag 'slab-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab · d30e51aa
    Linus Torvalds authored
    Pull slab updates from Vlastimil Babka:
    
     - SLUB: delayed freezing of CPU partial slabs (Chengming Zhou)
    
       Freezing is an operation involving double_cmpxchg() that makes a slab
       exclusive for a particular CPU. Chengming noticed that we use it also
       in situations where we are not yet installing the slab as the CPU
       slab, because freezing also indicates that the slab is not on the
       shared list. This results in redundant freeze/unfreeze operation and
       can be avoided by marking separately the shared list presence by
       reusing the PG_workingset flag.
    
       This approach neatly avoids the issues described in 9b1ea29b
       ("Revert "mm, slub: consider rest of partial list if acquire_slab()
       fails"") as we can now grab a slab from the shared list in a quick
       and guaranteed way without the cmpxchg_double() operation that
       amplifies the lock contention and can fail.
    
       As a result, lkp has reported 34.2% improvement of
       stress-ng.rawudp.ops_per_sec
    
     - SLAB removal and SLUB cleanups (Vlastimil Babka)
    
       The SLAB allocator has been deprecated since 6.5 and nobody has
       objected so far. We agreed at LSF/MM to wait until the next LTS,
       which is 6.6, so we should be good to go now.
    
       This doesn't yet erase all traces of SLAB outside of mm/ so some dead
       code, comments or documentation remain, and will be cleaned up
       gradually (some series are already in the works).
    
       Removing the choice of allocators has already allowed to simplify and
       optimize the code wiring up the kmalloc APIs to the SLUB
       implementation.
    
    * tag 'slab-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: (34 commits)
      mm/slub: free KFENCE objects in slab_free_hook()
      mm/slub: handle bulk and single object freeing separately
      mm/slub: introduce __kmem_cache_free_bulk() without free hooks
      mm/slub: fix bulk alloc and free stats
      mm/slub: optimize free fast path code layout
      mm/slub: optimize alloc fastpath code layout
      mm/slub: remove slab_alloc() and __kmem_cache_alloc_lru() wrappers
      mm/slab: move kmalloc() functions from slab_common.c to slub.c
      mm/slab: move kmalloc_slab() to mm/slab.h
      mm/slab: move kfree() from slab_common.c to slub.c
      mm/slab: move struct kmem_cache_node from slab.h to slub.c
      mm/slab: move memcg related functions from slab.h to slub.c
      mm/slab: move pre/post-alloc hooks from slab.h to slub.c
      mm/slab: consolidate includes in the internal mm/slab.h
      mm/slab: move the rest of slub_def.h to mm/slab.h
      mm/slab: move struct kmem_cache_cpu declaration to slub.c
      mm/slab: remove mm/slab.c and slab_def.h
      mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs
      mm/slab: remove CONFIG_SLAB code from slab common code
      cpu/hotplug: remove CPUHP_SLAB_PREPARE hooks
      ...
    d30e51aa
Kconfig 79.3 KB