Re: [PATCH] per-cpu slab

From: Manfred Spraul (manfred@colorfullife.com)
Date: Fri Jun 09 2000 - 12:41:06 EST


From: "Chuck Lever" <cel@monkey.org>
>
> did you measure how often a CPU *frees* a cache object allocated by
> another CPU? i recall someone saying this doesn't occur frequently --
> however, it can be a reliability issue if doing this causes even a small
> leak. that might be a good statistic to keep if you don't keep it
> already.
>
I don't check that, and it is not yet critical:

Objects aren't owned by a certain cpu (*), instead each cpu has a limited
FIFO buffer (at most 252 entries) and alloc/free calls go into that FIFO
buffer. If the buffer overflows, then the objects are given back / taken
from the global cache. Allocing one one cpu and freeing on another cpu
doesn't cause a memory leak, only the decrease of cache line ping-pong won't
be optimal.

(*) for NUMA we might have to add another layer on top of my patch: objects
should be given back to the node they came from. But I have no idea if this
is realistic/necessary/important/...

--
    Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:19 EST