Skip to content

Commit 87d277a

Browse files
KAGA-KOKOSebastian Andrzej Siewior
authored andcommitted
mm: Enable SLUB for RT
Avoid the memory allocation in IRQ section Signed-off-by: Thomas Gleixner <[email protected]> [bigeasy: factor out everything except the kcalloc() workaorund ] Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
1 parent c266bd0 commit 87d277a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mm/slub.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3730,6 +3730,11 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
37303730
const char *text)
37313731
{
37323732
#ifdef CONFIG_SLUB_DEBUG
3733+
#ifdef CONFIG_PREEMPT_RT
3734+
/* XXX move out of irq-off section */
3735+
slab_err(s, page, text, s->name);
3736+
#else
3737+
37333738
void *addr = page_address(page);
37343739
void *p;
37353740
unsigned long *map = bitmap_zalloc(page->objects, GFP_ATOMIC);
@@ -3749,8 +3754,10 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
37493754
slab_unlock(page);
37503755
bitmap_free(map);
37513756
#endif
3757+
#endif
37523758
}
37533759

3760+
37543761
/*
37553762
* Attempt to free all partial slabs on a node.
37563763
* This is called from __kmem_cache_shutdown(). We must take list_lock

0 commit comments

Comments
 (0)