From: Christoph Lameter <cl@linux.com>
To: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Martin Bligh <mbligh@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/3] slub: add per-cache slab thrash ratio
Date: Mon, 30 Mar 2009 17:19:45 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.1.10.0903301718080.25929@qirst.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0903301309010.21074@chino.kir.corp.google.com>
On Mon, 30 Mar 2009, David Rientjes wrote:
> > > + if (oo_objects(s->oo))
> > > + thrash_ratio = s->min_free_watermark * 100 / oo_objects(s->oo);
> > > s->oo = oo_make(order, size);
> >
> > s->oo is set *after* you check it. Check oo_objects after the value has
> > been set please.
> >
>
> It's actually right the way I implemented it, oo_objects(s->oo) will be 0
> when this is called for kmem_cache_open() meaning there is no preexisting
> slab_thrash_ratio. But this check is required when calculate_sizes() is
> called from order_store() to adjust the slab_thrash_ratio for the new
> objects per slab. The above check is saving the old thrash ratio so
> the new s->min_free_watermark value can be set following the
> oo_make(). This was mentioned in the changelog for this patch:
>
> The value is stored in terms of the number of objects that the
> ratio represents, not the ratio itself. This avoids costly
> arithmetic in the slowpath for a calculation that could otherwise
> be done only when `slab_thrash_ratio' or `order' is changed.
Then its the wrong place to set it. Initializations are done in
kmem_cache_open() after calculate_sizes are called.
next prev parent reply other threads:[~2009-03-30 21:24 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
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 [this message]
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
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.1.10.0903301718080.25929@qirst.com \
--to=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=nickpiggin@yahoo.com.au \
--cc=penberg@cs.helsinki.fi \
--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
all inboxes | Powered by JetHome®