2020-10-12 12:52:06 +00:00
|
|
|
From c9de59c5101c541781f89f8078ad9096044722ca Mon Sep 17 00:00:00 2001
|
|
|
|
Message-Id: <c9de59c5101c541781f89f8078ad9096044722ca.1601675151.git.zanussi@kernel.org>
|
|
|
|
In-Reply-To: <5b5a156f9808b1acf1205606e03da117214549ea.1601675151.git.zanussi@kernel.org>
|
|
|
|
References: <5b5a156f9808b1acf1205606e03da117214549ea.1601675151.git.zanussi@kernel.org>
|
2018-08-27 14:32:32 +00:00
|
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
Date: Thu, 25 Oct 2012 10:32:35 +0100
|
2020-09-04 20:10:21 +00:00
|
|
|
Subject: [PATCH 081/333] mm: Enable SLUB for RT
|
2020-10-12 12:52:06 +00:00
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.148-rt64.tar.xz
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
Avoid the memory allocation in IRQ section
|
|
|
|
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
[bigeasy: factor out everything except the kcalloc() workaorund ]
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
mm/slub.c | 6 ++++++
|
2018-08-27 14:32:32 +00:00
|
|
|
1 file changed, 6 insertions(+)
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
diff --git a/mm/slub.c b/mm/slub.c
|
2020-10-12 12:52:06 +00:00
|
|
|
index f613c501ccbf..b1201a491169 100644
|
2018-08-27 14:32:32 +00:00
|
|
|
--- a/mm/slub.c
|
|
|
|
+++ b/mm/slub.c
|
2020-07-15 20:05:29 +00:00
|
|
|
@@ -3726,6 +3726,11 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
|
2018-08-27 14:32:32 +00:00
|
|
|
const char *text)
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_SLUB_DEBUG
|
|
|
|
+#ifdef CONFIG_PREEMPT_RT_BASE
|
|
|
|
+ /* XXX move out of irq-off section */
|
|
|
|
+ slab_err(s, page, text, s->name);
|
|
|
|
+#else
|
|
|
|
+
|
|
|
|
void *addr = page_address(page);
|
|
|
|
void *p;
|
|
|
|
unsigned long *map = kcalloc(BITS_TO_LONGS(page->objects),
|
2020-07-15 20:05:29 +00:00
|
|
|
@@ -3747,6 +3752,7 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
|
2018-08-27 14:32:32 +00:00
|
|
|
slab_unlock(page);
|
|
|
|
kfree(map);
|
|
|
|
#endif
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2020-01-03 23:36:11 +00:00
|
|
|
--
|
2020-06-22 13:14:16 +00:00
|
|
|
2.17.1
|
2020-01-03 23:36:11 +00:00
|
|
|
|