All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org
Cc: Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [QUESTION] is SLAB considered legacy and deprecated?
Date: Mon, 27 Sep 2021 19:03:19 +0200	[thread overview]
Message-ID: <8aa15f4b-71de-5283-5ebc-d8d1a323473d@suse.cz> (raw)
In-Reply-To: <20210927090347.GA2533@linux.asia-northeast3-a.c.our-ratio-313919.internal>

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
> 


  reply	other threads:[~2021-09-27 17:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  9:03 [QUESTION] is SLAB considered legacy and deprecated? Hyeonggon Yoo
2021-09-27 17:03 ` Vlastimil Babka [this message]
2021-09-28 11:12   ` Hyeonggon Yoo
2021-09-29 10:50     ` Hyeonggon Yoo
2021-10-01 14:07     ` Vlastimil Babka
2021-10-03  5:59       ` Hyeonggon Yoo
2021-10-04  1:25         ` David Rientjes
2021-10-04  1:25           ` David Rientjes
2021-10-04  6:01           ` Hyeonggon Yoo
2021-10-04 11:39             ` Vlastimil Babka
2021-10-05 13:31               ` Hyeonggon Yoo
2021-10-04 11:34         ` Vlastimil Babka
2021-10-04 14:22           ` Hyeonggon Yoo
2021-10-01  0:39   ` Queueing is outside of SLUB nowdays Hyeonggon Yoo
2021-10-04 14:56     ` Christoph Lameter
2021-10-04 14:56       ` Christoph Lameter
2021-10-05  8:19       ` Vlastimil Babka
2021-10-05 14:16         ` Hyeonggon Yoo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8aa15f4b-71de-5283-5ebc-d8d1a323473d@suse.cz \
    --to=vbabka@suse.cz \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.