2020-02-21 18:07:43 +00:00
|
|
|
From 192ae1c9b15aa4c895b203333d6d51d4719fb9f7 Mon Sep 17 00:00:00 2001
|
2018-08-27 14:32:32 +00:00
|
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
Date: Thu, 25 Oct 2012 10:32:35 +0100
|
2020-02-21 18:07:43 +00:00
|
|
|
Subject: [PATCH 081/319] mm: Enable SLUB for RT
|
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.103-rt42.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
|
2019-11-25 00:04:39 +00:00
|
|
|
index 224663e20772..cbe47408c6eb 100644
|
2018-08-27 14:32:32 +00:00
|
|
|
--- a/mm/slub.c
|
|
|
|
+++ b/mm/slub.c
|
2019-04-30 12:45:19 +00:00
|
|
|
@@ -3680,6 +3680,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),
|
2019-04-30 12:45:19 +00:00
|
|
|
@@ -3701,6 +3706,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-02-21 18:07:43 +00:00
|
|
|
2.25.0
|
2020-01-03 23:36:11 +00:00
|
|
|
|