public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] SLAB : NUMA cache_free_alien() very expensive because of virt_to_slab(objp); nodeid = slabp->nodeid;
@ 2007-03-20 17:12 Eric Dumazet
  2007-03-20 19:54 ` Christoph Lameter
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Dumazet @ 2007-03-20 17:12 UTC (permalink / raw)
  To: Andrew Morton, Christoph Lameter, Andi Kleen; +Cc: linux kernel

Hi

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() ?
On x86_64 pfn_to_nid usually shares one cache line for all objects (struct memnode)

Is it possible virt_to_slab(objp)->nodeid being different from pfn_to_nid(objp) ?

Eric

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2007-04-09 20:24 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 17:12 [RFC] SLAB : NUMA cache_free_alien() very expensive because of virt_to_slab(objp); nodeid = slabp->nodeid; Eric Dumazet
2007-03-20 19:54 ` Christoph Lameter
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox