All of
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <>
Cc: Christoph Lameter <>,
	Pekka Enberg <>,
	David Rientjes <>,
	Joonsoo Kim <>,
	Andrew Morton <>,
	Vlastimil Babka <>, Ingo Molnar <>,
	Thomas Gleixner <>
Subject: [PATCH] mm: Allow only SLUB on PREEMPT_RT
Date: Fri, 15 Oct 2021 23:03:36 +0200	[thread overview]
Message-ID: <> (raw)

From: Ingo Molnar <>
Date: Fri, 3 Jul 2009 08:44:03 -0500

Memory allocators may disable interrupts or preemption as part of the
allocation and freeing process. For PREEMPT_RT it is important that
these sections remain deterministic and short and therefore don't depend
on the size of the memory to allocate/ free or the inner state of the

Until v3.12-RT the SLAB allocator was an option but involved several
changes to meet all the requirements. The SLUB design fits better with
PREEMPT_RT model and so the SLAB patches were dropped in the 3.12-RT
patchset. Comparing the two allocator, SLUB outperformed SLAB in both
throughput (time needed to allocate and free memory) and the maximal
latency of the system measured with cyclictest during hackbench.

SLOB was never evaluated since it was unlikely that it preforms better
than SLAB. During a quick test, the kernel crashed with SLOB enabled
during boot.

Disable SLAB and SLOB on PREEMPT_RT.

[bigeasy: commit description.]

Signed-off-by: Ingo Molnar <>
Signed-off-by: Thomas Gleixner <>
Signed-off-by: Sebastian Andrzej Siewior <>
 init/Kconfig |    2 ++
 1 file changed, 2 insertions(+)

--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1896,6 +1896,7 @@ choice
 config SLAB
 	bool "SLAB"
+	depends on !PREEMPT_RT
 	  The regular slab allocator that is established and known to work
@@ -1916,6 +1917,7 @@ config SLUB
 config SLOB
 	depends on EXPERT
 	bool "SLOB (Simple Allocator)"
+	depends on !PREEMPT_RT
 	   SLOB replaces the stock allocator with a drastically simpler
 	   allocator. SLOB is generally more space efficient but

             reply	other threads:[~2021-10-15 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 21:03 Sebastian Andrzej Siewior [this message]
2021-10-15 21:21 ` [PATCH] mm: Allow only SLUB on PREEMPT_RT Vlastimil Babka

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* 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.