Re: [PATCH 2/2] mm: create a separate slab for page->ptl allocation

2013-11-17 Thread Stephen Rothwell
Hi Geert, On Sat, 16 Nov 2013 21:43:32 +0100 Geert Uytterhoeven wrote: > > On Thu, Nov 7, 2013 at 3:14 PM, Kirill A. Shutemov > wrote: > > --- a/include/linux/mm.h > > +++ b/include/linux/mm.h > > > +static inline void pgtable_init(void) > > +{ > > + ptlock_cache_init(); > > +

Re: [PATCH 2/2] mm: create a separate slab for page-ptl allocation

2013-11-17 Thread Stephen Rothwell
Hi Geert, On Sat, 16 Nov 2013 21:43:32 +0100 Geert Uytterhoeven ge...@linux-m68k.org wrote: On Thu, Nov 7, 2013 at 3:14 PM, Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: --- a/include/linux/mm.h +++ b/include/linux/mm.h +static inline void pgtable_init(void) +{ +

Re: [PATCH 2/2] mm: create a separate slab for page->ptl allocation

2013-11-16 Thread Geert Uytterhoeven
On Thu, Nov 7, 2013 at 3:14 PM, Kirill A. Shutemov wrote: > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > +static inline void pgtable_init(void) > +{ > + ptlock_cache_init(); > + pgtable_cache_init(); > +} sparc64defconfig: include/linux/mm.h:1391:2: error: implicit

Re: [PATCH 2/2] mm: create a separate slab for page-ptl allocation

2013-11-16 Thread Geert Uytterhoeven
On Thu, Nov 7, 2013 at 3:14 PM, Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: --- a/include/linux/mm.h +++ b/include/linux/mm.h +static inline void pgtable_init(void) +{ + ptlock_cache_init(); + pgtable_cache_init(); +} sparc64defconfig: include/linux/mm.h:1391:2:

[PATCH 2/2] mm: create a separate slab for page->ptl allocation

2013-11-07 Thread Kirill A. Shutemov
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

[PATCH 2/2] mm: create a separate slab for page-ptl allocation

2013-11-07 Thread Kirill A. Shutemov
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