From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Pekka Enberg <penberg@kernel.org>
Cc: Dave Hansen <dave@sr71.net>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH] mm: slub: fix ALLOC_SLOWPATH stat
Date: Wed, 7 May 2014 20:05:10 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1405072004390.12567@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1401211413440.1666@chino.kir.corp.google.com>
On Tue, 21 Jan 2014, David Rientjes wrote:
> On Wed, 8 Jan 2014, David Rientjes wrote:
>
> > > There used to be only one path out of __slab_alloc(), and
> > > ALLOC_SLOWPATH got bumped in that exit path. Now there are two,
> > > and a bunch of gotos. ALLOC_SLOWPATH can now get set more than once
> > > during a single call to __slab_alloc() which is pretty bogus.
> > > Here's the sequence:
> > >
> > > 1. Enter __slab_alloc(), fall through all the way to the
> > > stat(s, ALLOC_SLOWPATH);
> > > 2. hit 'if (!freelist)', and bump DEACTIVATE_BYPASS, jump to
> > > new_slab (goto #1)
> > > 3. Hit 'if (c->partial)', bump CPU_PARTIAL_ALLOC, goto redo
> > > (goto #2)
> > > 4. Fall through in the same path we did before all the way to
> > > stat(s, ALLOC_SLOWPATH)
> > > 5. bump ALLOC_REFILL stat, then return
> > >
> > > Doing this is obviously bogus. It keeps us from being able to
> > > accurately compare ALLOC_SLOWPATH vs. ALLOC_FASTPATH. It also
> > > means that the total number of allocs always exceeds the total
> > > number of frees.
> > >
> > > This patch moves stat(s, ALLOC_SLOWPATH) to be called from the
> > > same place that __slab_alloc() is. This makes it much less
> > > likely that ALLOC_SLOWPATH will get botched again in the
> > > spaghetti-code inside __slab_alloc().
> > >
> > > Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> >
> > Acked-by: David Rientjes <rientjes@google.com>
> >
>
> Pekka, are you going to pick this up for linux-next? I think it would be
> nice to have for 3.14 for those of us who use the stats.
>
Ping #2. Pekka or Andrew, would you pick this up for linux-next?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-05-08 3:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 20:43 Dave Hansen
2014-01-07 2:44 ` Christoph Lameter
2014-01-07 4:44 ` Wanpeng Li
2014-01-09 2:24 ` David Rientjes
2014-01-21 22:14 ` David Rientjes
2014-05-08 3:05 ` David Rientjes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1405072004390.12567@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=dave@sr71.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox