From: Christoph Lameter <cl@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/2] slub: move min_partial to struct kmem_cache
Date: Mon, 23 Feb 2009 11:09:22 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.1.10.0902231108200.22276@qirst.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0902221710430.26165@chino.kir.corp.google.com>
On Sun, 22 Feb 2009, David Rientjes wrote:
> +static void calculate_min_partial(struct kmem_cache *s, unsigned long min)
> +{
> + if (min < MIN_PARTIAL)
> + min = MIN_PARTIAL;
> + else if (min > MAX_PARTIAL)
> + min = MAX_PARTIAL;
> + s->min_partial = min;
> +}
> +
> /*
> * calculate_sizes() determines the order and the distribution of data within
> * a slab object.
> @@ -2319,6 +2317,11 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
> if (!calculate_sizes(s, -1))
> goto error;
>
> + /*
> + * The larger the object size is, the more pages we want on the partial
> + * list to avoid pounding the page allocator excessively.
> + */
> + calculate_min_partial(s, ilog2(s->size));
> s->refcount = 1;
> #ifdef CONFIG_NUMA
> s->remote_node_defrag_ratio = 1000;
>
Move the ilog2 use into calculate_min_partial()? Otherweise
calculate_min_partial is merely enforcing limits and not doing any
calculations.
next prev parent reply other threads:[~2009-02-23 16:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 1:40 David Rientjes
2009-02-23 1:40 ` [patch 2/2] slub: add min_partial sysfs tunable David Rientjes
2009-02-23 8:19 ` Pekka Enberg
2009-02-23 9:58 ` David Rientjes
2009-02-23 10:26 ` Pekka Enberg
2009-02-23 16:11 ` Christoph Lameter
2009-02-23 16:09 ` Christoph Lameter [this message]
2009-02-23 16:23 ` [patch 1/2] slub: move min_partial to struct kmem_cache David Rientjes
2009-02-23 16:20 ` [patch 1/2] slub: move min_partial to struct kmem_cach Christoph Lameter
2009-02-23 16:37 ` David Rientjes
2009-02-25 7:17 ` Pekka Enberg
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.0902231108200.22276@qirst.com \
--to=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--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®