![]() | |||||||||||||
Messages in this thread |
Christoph Lameter a écrit :
> On Wed, 21 Mar 2007, Eric Dumazet wrote:
>
>> The fast path is to put the pointer, into the cpu array cache. This object
>> might be given back some cycles later, because of a kmem_cache_alloc() : No
>> need to access the two cache lines (struct page, struct slab)
>
> If you do that then the slab will no longer return objects from the
> desired nodes. The assumption is that cpu array objects are from the local
> node.
Me confused.
How the following could be wrong ?
static inline int cache_free_alien(struct kmem_cache *cachep, void *objp)
{
int mynode = numa_node_id();
int objnode = virt_to_nid(objp); // or whatever
if (mynode == objnode)
return 0;
...
}
If numa_node_id() is equal to the node of the page containing the first byte
of the object, then object is on the local node. Or what ?
Thank you
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
| ||||||||||||
| Last update: 2007-03-21 08:17 [from the cache] ©2003-2008 | |||||||||||||