From: Pekka Enberg <penberg@cs.helsinki.fi>
To: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] slub: default min_partial to at least highest cpus per node
Date: Tue, 7 Apr 2009 22:09:46 +0300 [thread overview]
Message-ID: <84144f020904071209j638aae9bv406661ec401af7af@mail.gmail.com> (raw)
In-Reply-To: <49DBA23A.3000106@cs.helsinki.fi>
David Rientjes wrote:
>> The pre-defined MIN_PARTIAL value may not be suitable for machines with a
>> large number of cpus per node. To avoid excessively allocating new slabs
>> because there is not at least the same number of slabs on a node's
>> partial list as cpus, this will default a cache's min_partial value to be
>> at least the highest number of cpus per node on the system.
>>
>> This default will never exceed MAX_PARTIAL, however, so very large
>> systems don't waste an excessive amount of memory.
>>
>> When remote_node_defrag_ratio allows defragmenting remote nodes, it
>> ensures that nr_partial exceeds min_partial so there will always be a
>> local reserve when a cpu slab is filled to avoid allocating new slabs
>> locally as a result of a remote cpu stealing a partial slab.
>>
>> The cache's min_partial setting may still be changed by writing to
>> /sys/kernel/slab/cache/min_partial. The only restriction when doing so
>> is that the value be within MIN_PARTIAL and MAX_PARTIAL.
>>
>> Cc: Christoph Lameter <cl@linux-foundation.org>
>> Signed-off-by: David Rientjes <rientjes@google.com>
On Tue, Apr 7, 2009 at 9:58 PM, Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> Hmm, partial lists are per-node, so wouldn't it be better to do the
> adjustment for every struct kmem_cache_node separately? The
> 'min_partial_per_node' global seems just too ugly and confusing to live
> with.
Btw, that requires moving ->min_partial to struct kmem_cache_node from
struct kmem_cache. But I think that makes a whole lot of sense if
some nodes may have more CPUs than others.
And while the improvement is kinda obvious, I would be interested to
know what kind of workload benefits from this patch (and see numbers
if there are any).
Pekka
next prev parent reply other threads:[~2009-04-07 19:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 0:52 David Rientjes
2009-04-07 18:58 ` Pekka Enberg
2009-04-07 19:09 ` Pekka Enberg [this message]
2009-04-07 19:44 ` David Rientjes
2009-04-07 19:54 ` Pekka Enberg
2009-04-07 20:09 ` David Rientjes
2009-04-07 20:11 ` Pekka Enberg
2009-04-07 20:22 ` David Rientjes
2009-04-07 20:35 ` Pekka Enberg
2009-04-07 20:43 ` Christoph Lameter
2009-04-07 20:48 ` Pekka Enberg
2009-04-07 21:31 ` Christoph Lameter
2009-04-07 21:46 ` David Rientjes
2009-04-07 21:48 ` Christoph Lameter
2009-04-07 22:03 ` David Rientjes
2009-04-13 18:07 ` Christoph Lameter
2009-04-07 22:01 ` 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=84144f020904071209j638aae9bv406661ec401af7af@mail.gmail.com \
--to=penberg@cs.helsinki.fi \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--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®