[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8aa15f4b-71de-5283-5ebc-d8d1a323473d@suse.cz>
Date: Mon, 27 Sep 2021 19:03:19 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Hyeonggon Yoo <42.hyeyoo@...il.com>, linux-mm@...ck.org
Cc: Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [QUESTION] is SLAB considered legacy and deprecated?
On 9/27/21 11:03, Hyeonggon Yoo wrote:
> Hello there,
>
> I've been working on adding 'lockless cache' on sl[au]b for a while.
> But what it actually does is actually adding 'queuing' on slub.
Yeah, I pointed out those threads from 2011 that called it exactly that...
was there any conclusion why that was not ultimately merged?
> So there is a fundamental question coming into my mind:
> 'is SLAB considered legacy and deprecated?'
To some extend, but not yet in a sense where we would have a deadline to get
rid of it. In some contexts it's still being preferred, AFAIK. But it's okay
if new optional features require just SLUB - for example PREEMPT_RT.
> It seems there are little development on SLAB and people think that
> SLAB is legacy and deprecated, so CONFIG_SLUB is used by default.
>
> But I think both has pros and cons for their own:
> SLAB: more temporal locality (cache friendly)
> but high usage of memory, and less spatial locality (TLB misses) than SLUB.
>
> SLUB: less temporal locality (less cache friendly) than SLAB
> but more spatial locality (TLB hit), and low usage of memory
> and good debugging feature.
I'm not so sure about the usage of memory, SLUB can easily use more I
believe. Instead of caching some arrays of objects it will have one or more
private slabs per cpu, and the slabs are larger-order pages.
> Why do people say SLAB is deprecated/legacy?
Do they?
> Thanks,
> Hyeonggon
>
Powered by blists - more mailing lists