Re: [LSF/MM/BPF TOPIC] SLOB+SLAB allocators removal and future SLUB improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 16, 2023 at 09:18:11AM +0100, Vlastimil Babka wrote:
> On 3/15/23 03:54, Roman Gushchin wrote:
> > On Tue, Mar 14, 2023 at 09:05:13AM +0100, Vlastimil Babka wrote:
> >> As you're probably aware, my plan is to get rid of SLOB and SLAB, leaving
> >> only SLUB going forward. The removal of SLOB seems to be going well, there
> >> were no objections to the deprecation and I've posted v1 of the removal
> >> itself [1] so it could be in -next soon.
> >> 
> >> The immediate benefit of that is that we can allow kfree() (and kfree_rcu())
> >> to free objects from kmem_cache_alloc() - something that IIRC at least xfs
> >> people wanted in the past, and SLOB was incompatible with that.
> >> 
> >> For SLAB removal I haven't yet heard any objections (but also didn't
> >> deprecate it yet) but if there are any users due to particular workloads
> >> doing better with SLAB than SLUB, we can discuss why those would regress and
> >> what can be done about that in SLUB.
> >> 
> >> Once we have just one slab allocator in the kernel, we can take a closer
> >> look at what the users are missing from it that forces them to create own
> >> allocators (e.g. BPF), and could be considered to be added as a generic
> >> implementation to SLUB.
> > 
> > I guess eventually we want to merge the percpu allocator too.
> 
> What exactly do you mean here, probably not mm/percpu.c

Actually, I mean mm/percpu.c

> which is too different from slab

It is currently, but mostly for historical reasons, I guess.

In fact, all is needed (I drastically simplify here) is to replicate
an allocation for each cpu, which can be done by having special slab_caches
with a set of pages per cpu. I believe that in the long run the percpu allocator
can greatly benefit from it. The need for the performance and fragmentation avoidance
improvements grows with the increased number of percpu applications.

But it's not a small project by any means and to my knowledge nobody is actively
working on it, so my comment can be ignored now.

Thanks!



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux