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>
Showing
- include/linux/lockref.h 1 addition, 1 deletioninclude/linux/lockref.h
- include/linux/mm.h 3 additions, 3 deletionsinclude/linux/mm.h
- include/linux/mm_types.h 2 additions, 1 deletioninclude/linux/mm_types.h
- kernel/bounds.c 1 addition, 1 deletionkernel/bounds.c
- mm/memory.c 1 addition, 1 deletionmm/memory.c
Loading
Please register or sign in to comment