mm: create a separate slab for page->ptl allocation

If DEBUG_SPINLOCK and DEBUG_LOCK_ALLOC are enabled spinlock_t on x86_64
is 72 bytes.  For page->ptl they will be allocated from kmalloc-96 slab,
so we loose 24 on each.  An average system can easily allocate few tens
thousands of page->ptl and overhead is significant.

Let's create a separate slab for page->ptl allocation to solve this.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Kirill A. Shutemov
2013-11-14 14:31:53 -08:00
committed by Linus Torvalds
parent 539edb5846
commit ea1e7ed337
3 changed files with 17 additions and 1 deletions

View File

@@ -473,7 +473,7 @@ static void __init mm_init(void)
mem_init();
kmem_cache_init();
percpu_init_late();
pgtable_cache_init();
pgtable_init();
vmalloc_init();
}