From: Christoph Lameter <christoph@lameter.com>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] SLAB : NUMA cache_free_alien() very expensive because of virt_to_slab(objp); nodeid = slabp->nodeid;
Date: Tue, 20 Mar 2007 12:54:45 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0703201248530.12664@graphe.net> (raw)
In-Reply-To: <20070320181235.77d28864.dada1@cosmosbay.com>
On Tue, 20 Mar 2007, Eric Dumazet wrote:
>
> I noticed on a small x86_64 NUMA setup (2 nodes) that cache_free_alien() is very expensive.
> This is because of a cache miss on struct slab.
> At the time an object is freed (call to kmem_cache_free() for example), the underlying 'struct slab' is not anymore cache-hot.
>
> struct slab *slabp = virt_to_slab(objp);
> nodeid = slabp->nodeid; // cache miss
>
> So we currently need slab only to lookup nodeid, to be able to use the cachep cpu cache, or not.
>
> Couldn't we use something less expensive, like pfn_to_nid() ?
Nodeid describes the node that the slab was allocated for which may
not be equal to the node that the page came from. But if GFP_THISNODE is
used then this should always be the same. That those two nodeid are
different was certainly frequent before the GFP_THISNODE work went in. Now
it may just occur in corner cases. Perhaps during bootup on
some machines that boot with empty nodes. I vaguely recall a powerpc
issue.
> Is it possible virt_to_slab(objp)->nodeid being different from pfn_to_nid(objp) ?
It is possible the page allocator falls back to another node than
requested. We would need to check that this never occurs.
If we are sure then we could drop the nodeid field completely.
next prev parent reply other threads:[~2007-03-20 20:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 17:12 Eric Dumazet
2007-03-20 19:54 ` Christoph Lameter [this message]
2007-03-20 21:32 ` Andi Kleen
2007-03-20 22:09 ` Eric Dumazet
2007-03-21 0:16 ` Christoph Lameter
2007-03-21 6:27 ` Eric Dumazet
2007-03-21 6:57 ` [PATCH] SLAB : Use num_possible_cpus() in enable_cpucache() Eric Dumazet
2007-03-21 7:21 ` [PATCH] SLAB : Dont allocate empty shared caches Eric Dumazet
2007-03-21 13:13 ` Pekka Enberg
2007-03-21 13:02 ` [PATCH] SLAB : Use num_possible_cpus() in enable_cpucache() Pekka Enberg
2007-03-21 18:45 ` Christoph Lameter
2007-03-21 7:03 ` [RFC] SLAB : NUMA cache_free_alien() very expensive because of virt_to_slab(objp); nodeid = slabp->nodeid; Christoph Lameter
2007-03-21 7:14 ` Eric Dumazet
2007-03-21 14:35 ` Christoph Lameter
2007-03-21 0:18 ` Christoph Lameter
2007-03-21 2:44 ` Andi Kleen
2007-03-21 3:10 ` Christoph Lameter
2007-03-22 21:28 ` non-NUMA cache_free_alien() (was Re: [RFC] SLAB : NUMA cache_free_alien() very expensive because of virt_to_slab(objp); nodeid = slabp->nodeid;) Siddha, Suresh B
2007-03-22 22:10 ` Christoph Lameter
2007-03-22 22:12 ` Eric Dumazet
2007-03-22 22:40 ` Siddha, Suresh B
2007-03-22 22:56 ` Eric Dumazet
2007-03-23 1:25 ` Christoph Lameter
2007-03-23 14:14 ` Andi Kleen
2007-03-23 14:12 ` Andi Kleen
2007-04-02 22:55 ` Siddha, Suresh B
2007-04-03 0:23 ` Christoph Lameter
2007-04-03 0:31 ` Siddha, Suresh B
2007-04-09 18:01 ` [patch 1/2] x86_64: set node_possible_map at runtime Siddha, Suresh B
2007-04-09 18:07 ` [patch 2/2] slab, x86_64: skip cache_free_alien() on non NUMA Siddha, Suresh B
2007-04-09 20:23 ` [patch 1/2] x86_64: set node_possible_map at runtime Andrew Morton
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=Pine.LNX.4.64.0703201248530.12664@graphe.net \
--to=christoph@lameter.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
/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®