From: Pekka Enberg <penberg@cs.helsinki.fi>
To: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Martin Bligh <mbligh@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 2/3] slub: scan partial list for free slabs when thrashing
Date: Tue, 31 Mar 2009 11:49:11 +0300 [thread overview]
Message-ID: <1238489352.26587.40.camel@penberg-laptop> (raw)
In-Reply-To: <alpine.DEB.2.00.0903310043060.5579@chino.kir.corp.google.com>
Hi David,
On Mon, 2009-03-30 at 10:37 -0400, Christoph Lameter wrote:
> > > That adds fastpath overhead and it shows for small objects in your tests.
On Tue, 31 Mar 2009, Pekka Enberg wrote:
> > Yup, and looking at this:
> >
> > + u16 fastpath_allocs; /* Consecutive fast allocs before slowpath */
> > + u16 slowpath_allocs; /* Consecutive slow allocs before watermark */
> >
> > How much do operations on u16 hurt on, say, x86-64?
On Tue, 2009-03-31 at 01:23 -0700, David Rientjes wrote:
> As opposed to unsigned int? These simply use the word variations of the
> mov, test, cmp, and inc instructions instead of long. It's the same
> tradeoff when using the u16 slub fields within struct page except it's not
> strictly required in this instance because of size limitations, but rather
> for cacheline optimization.
I was thinking of partial register stalls. But looking at it on x86-64,
the generated asm seems sane. I see tons of branch instructions, though,
so simplifying this somehow:
+ if (is_empty) {
+ if (c->fastpath_allocs < s->min_free_watermark)
+ c->slowpath_allocs++;
+ else if (c->slowpath_allocs)
+ c->slowpath_allocs--;
+ } else
+ c->slowpath_allocs = 0;
+ c->fastpath_allocs = 0;
would be most welcome.
Pekka
next prev parent reply other threads:[~2009-03-31 8:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 5:43 [patch 0/3] slub partial list thrashing performance degradation David Rientjes
2009-03-30 5:43 ` [patch 1/3] slub: add per-cache slab thrash ratio David Rientjes
2009-03-30 5:43 ` [patch 2/3] slub: scan partial list for free slabs when thrashing David Rientjes
2009-03-30 5:43 ` [patch 3/3] slub: sort parital list " David Rientjes
2009-03-30 14:41 ` Christoph Lameter
2009-03-30 20:29 ` David Rientjes
2009-03-30 14:37 ` [patch 2/3] slub: scan partial list for free slabs " Christoph Lameter
2009-03-30 20:22 ` David Rientjes
2009-03-30 21:20 ` Christoph Lameter
2009-03-31 7:13 ` Pekka Enberg
2009-03-31 8:23 ` David Rientjes
2009-03-31 8:49 ` Pekka Enberg [this message]
2009-03-31 13:23 ` Christoph Lameter
2009-03-30 7:11 ` [patch 1/3] slub: add per-cache slab thrash ratio Pekka Enberg
2009-03-30 8:41 ` David Rientjes
2009-03-30 15:54 ` Mel Gorman
2009-03-30 20:38 ` David Rientjes
2009-03-30 14:30 ` Christoph Lameter
2009-03-30 20:12 ` David Rientjes
2009-03-30 21:19 ` Christoph Lameter
2009-03-30 22:48 ` David Rientjes
2009-03-31 4:44 ` David Rientjes
2009-03-31 13:26 ` Christoph Lameter
2009-03-31 17:21 ` David Rientjes
2009-03-31 17:24 ` Christoph Lameter
2009-03-31 17:35 ` David Rientjes
2009-03-30 6:38 ` [patch 0/3] slub partial list thrashing performance degradation Pekka Enberg
-- strict thread matches above, loose matches on Subject: below --
2009-03-26 9:42 [patch 1/3] slub: add per-cache slab thrash ratio David Rientjes
2009-03-26 9:42 ` [patch 2/3] slub: scan partial list for free slabs when thrashing David Rientjes
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=1238489352.26587.40.camel@penberg-laptop \
--to=penberg@cs.helsinki.fi \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=nickpiggin@yahoo.com.au \
--cc=rientjes@google.com \
/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
Powered by JetHome