diff options
author | Thomas Gleixner | 2015-10-13 19:00:14 +0200 |
---|---|---|
committer | Thomas Gleixner | 2015-10-13 19:00:14 +0200 |
commit | e50226b4b86755e65aef2129e94d952fee3df722 (patch) | |
tree | d4dd925fc7f5c6fe46b647c8027911190595f014 /mm/slab.c | |
parent | genirq: Add flag to force mask in disable_irq[_nosync]() (diff) | |
parent | Linux 4.3-rc5 (diff) | |
download | kernel-qcow2-linux-e50226b4b86755e65aef2129e94d952fee3df722.tar.gz kernel-qcow2-linux-e50226b4b86755e65aef2129e94d952fee3df722.tar.xz kernel-qcow2-linux-e50226b4b86755e65aef2129e94d952fee3df722.zip |
Merge branch 'linus' into irq/core
Bring in upstream updates for patches which depend on them
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c index c77ebe6cc87c..4fcc5dd8d5a6 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -2190,9 +2190,16 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags) size += BYTES_PER_WORD; } #if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC) - if (size >= kmalloc_size(INDEX_NODE + 1) - && cachep->object_size > cache_line_size() - && ALIGN(size, cachep->align) < PAGE_SIZE) { + /* + * To activate debug pagealloc, off-slab management is necessary + * requirement. In early phase of initialization, small sized slab + * doesn't get initialized so it would not be possible. So, we need + * to check size >= 256. It guarantees that all necessary small + * sized slab is initialized in current slab initialization sequence. + */ + if (!slab_early_init && size >= kmalloc_size(INDEX_NODE) && + size >= 256 && cachep->object_size > cache_line_size() && + ALIGN(size, cachep->align) < PAGE_SIZE) { cachep->obj_offset += PAGE_SIZE - ALIGN(size, cachep->align); size = PAGE_SIZE; } |