Re: [git pull] vfs.git bits and pieces

From: Kirill A. Shutemov
Date: Thu Nov 21 2013 - 06:19:31 EST


Andrew Morton wrote:
> On Wed, 20 Nov 2013 14:33:35 -0800 Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > On Wed, Nov 20, 2013 at 9:47 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > BTW, something odd happened to mm/memory.c - either a mangled patch
> > > or a lost followup:
> > >
> > > commit ea1e7ed33708
> > > mm: create a separate slab for page->ptl allocation
> > >
> > > Fair enough, and yes, it does create that separate slab. The problem is,
> > > it's still using kmalloc/kfree for those beasts - page_ptl_cachep isn't
> > > used at all...
> >
> > Ok, it looks straightforward enough to just replace the kmalloc/kfree
> > with using a slab allocation using the page_ptl_cachep pointer. I'd do
> > it myself, but I would like to know how it got lost? Also, much
> > testing to make sure the cachep is initialized early enough.
>
> agh, I went through hell keeping that patch alive and it appears I lost
> some of it.

Actually, I've lost it while adding BLOATED_SPINLOCKS :(

> > Or should we just revert the commit that added the pointless/unused
> > slab pointer?
> >
> > Andrew, Kirill, comments?
>
> Let's just kill it please. We can try again for 3.14.

I'm okay with that.
Only side note: it's useful not only for debug case, but also for
PREEMPT_RT where spinlock_t is always bloated.

Fixed patch: