]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
Add parameter to add_partial to avoid having two functions
authorChristoph Lameter <clameter@sgi.com>
Tue, 8 Jan 2008 07:20:27 +0000 (23:20 -0800)
committerChristoph Lameter <clameter@sgi.com>
Mon, 4 Feb 2008 18:56:02 +0000 (10:56 -0800)
commit7c2e132c54c79af4e524154074b9a02c3c0d6072
tree0976894919b0a7675855d14cb7d68e007a200289
parent9824601ead957a29e35d539e43266c003f7b085b
Add parameter to add_partial to avoid having two functions

Add a parameter to add_partial instead of having separate functions.  The
parameter allows a more detailed control of where the slab pages is placed in
the partial queues.

If we put slabs back to the front then they are likely immediately used for
allocations.  If they are put at the end then we can maximize the time that
the partial slabs spent without being subject to allocations.

When deactivating slab we can put the slabs that had remote objects freed (we
can see that because objects were put on the freelist that requires locks) to
them at the end of the list so that the cachelines of remote processors can
cool down.  Slabs that had objects from the local cpu freed to them (objects
exist in the lockless freelist) are put in the front of the list to be reused
ASAP in order to exploit the cache hot state of the local cpu.

Patch seems to slightly improve tbench speed (1-2%).

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slub.c