LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, apw@shadowen.org,
hch@lst.de, manfred@colorfullife.com, christoph@lameter.com,
pj@sgi.com
Subject: Re: [PATCH] slab: NUMA kmem_cache diet
Date: Fri, 23 Mar 2007 08:45:49 +0100 [thread overview]
Message-ID: <460385AD.10502@cosmosbay.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0703230907010.17666@sbz-30.cs.Helsinki.FI>
Pekka J Enberg a écrit :
> (Please inline patches to the mail, makes it easier to review.)
>
> On Thu, 22 Mar 2007, Eric Dumazet wrote:
>> Some NUMA machines have a big MAX_NUMNODES (possibly 1024), but fewer possible
>> nodes. This patch dynamically sizes the 'struct kmem_cache' to allocate only
>> needed space.
>>
>> I moved nodelists[] field at the end of struct kmem_cache, and use the
>> following computation in kmem_cache_init()
>
> Hmm, what seems bit worrying is:
>
> diff --git a/mm/slab.c b/mm/slab.c
> index abf46ae..b187618 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -389,7 +389,6 @@ struct kmem_cache {
> unsigned int buffer_size;
> u32 reciprocal_buffer_size;
> /* 3) touched by every alloc & free from the backend */
> - struct kmem_list3 *nodelists[MAX_NUMNODES];
>
> I think nodelists is placed at the beginning of the struct for a reason.
> But I have no idea if it actually makes any difference...
It might make a difference if STATS is on, because freehit/freemiss might
share a cache line with nodelists. Apart that, a kmem_cache struct is
read_mostly : All changes are done outside of it, via array_cache or nodelists[].
Anyway slab STATS is already a SMP/NUMA nightmare because of cache line ping
pongs. We might place STATS counter in a/some dedicated cache line(s)...
next prev parent reply other threads:[~2007-03-23 7:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-02 13:47 [PATCH] slab: cache alloc cleanups Pekka J Enberg
2007-01-02 14:29 ` Andy Whitcroft
2007-01-02 16:25 ` Christoph Lameter
2007-01-02 20:27 ` Pekka Enberg
2007-01-02 20:22 ` Andrew Morton
2007-01-04 21:15 ` Christoph Hellwig
2007-01-04 21:23 ` Pekka Enberg
2007-03-22 22:34 ` [PATCH] slab: NUMA kmem_cache diet Eric Dumazet
2007-03-23 7:09 ` Pekka J Enberg
2007-03-23 7:45 ` Eric Dumazet [this message]
2007-03-23 13:00 ` Andy Whitcroft
2007-03-23 14:52 ` Christoph Lameter
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=460385AD.10502@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=christoph@lameter.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=penberg@cs.helsinki.fi \
--cc=pj@sgi.com \
--subject='Re: [PATCH] slab: NUMA kmem_cache diet' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).