diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2014-04-10 00:19:02 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-10 00:19:02 (GMT) |
commit | 62df817484fe9ace2b769f251846d4f18a9b0479 (patch) | |
tree | d12ed3e25e61736a16ae16b5599d8af565575495 /mm | |
parent | 63ebbe8b3dfbf25e491260e102e71c52f49ca5bb (diff) | |
download | linux-fsl-qoriq-62df817484fe9ace2b769f251846d4f18a9b0479.tar.xz |
slub: delay ctor until the object is requested
It seems that allocation of plenty objects causes latency on ARM since that
code can not be preempted
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1363,8 +1363,10 @@ static void setup_object(struct kmem_cache *s, struct page *page, void *object) { setup_object_debug(s, page, object); +#ifndef CONFIG_PREEMPT_RT_FULL if (unlikely(s->ctor)) s->ctor(object); +#endif } static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) @@ -2470,6 +2472,10 @@ redo: if (unlikely(gfpflags & __GFP_ZERO) && object) memset(object, 0, s->object_size); +#ifdef CONFIG_PREEMPT_RT_FULL + if (unlikely(s->ctor) && object) + s->ctor(object); +#endif slab_post_alloc_hook(s, gfpflags, object); |