[lkml]   [2007]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC] SLAB : NUMA cache_free_alien() very expensive because of virt_to_slab(objp); nodeid = slabp->nodeid;
    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
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-03-21 08:17    [W:0.020 / U:10.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site