]> git.baikalelectronics.ru Git - kernel.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)
commit785ff4d38195ca18eb0f0a9b39f6f565a5f3a584
tree0976894919b0a7675855d14cb7d68e007a200289
parentb070981d840f0875e0c8fbaef0833fd10ac74778
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