mm: do not allocate page->ptl dynamically, if spinlock_t fits to long
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 20 Dec 2013 11:35:58 +0000 (13:35 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Dec 2013 20:25:45 +0000 (12:25 -0800)
commit597d795a2a786d22dd872332428e2b9439ede639
tree1dd7be7e737649c7d346c695e0700c9732b2d681
parentfff4068cba484e6b0abe334ed6b15d5a215a3b25
mm: do not allocate page->ptl dynamically, if spinlock_t fits to long

In struct page we have enough space to fit long-size page->ptl there,
but we use dynamically-allocated page->ptl if size(spinlock_t) is larger
than sizeof(int).

It hurts 64-bit architectures with CONFIG_GENERIC_LOCKBREAK, where
sizeof(spinlock_t) == 8, but it easily fits into struct page.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/lockref.h
include/linux/mm.h
include/linux/mm_types.h
kernel/bounds.c
mm/memory.c
This page took 0.027313 seconds and 5 git commands to generate.