]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
SLUB: Fix default slab order for big object sizes
authorZhang Yanmin <yanmin.zhang@linux.intel.com>
Thu, 12 Feb 2009 16:00:17 +0000 (18:00 +0200)
committerPekka Enberg <penberg@cs.helsinki.fi>
Fri, 20 Feb 2009 10:26:12 +0000 (12:26 +0200)
commite8120ff1ffc51102ead1f4c98a3fd5d26fefc722
tree3cdadf0dc36df4a34f5ef30a788ef62d3a601de8
parent51735a7ca67531267a27b57e5fe20f7815192f9c
SLUB: Fix default slab order for big object sizes

The default order of kmalloc-8192 on 2*4 stoakley is an issue of
calculate_order.

slab_size       order           name
-------------------------------------------------
4096            3               sgpool-128
8192            2               kmalloc-8192
16384           3               kmalloc-16384

kmalloc-8192's default order is smaller than sgpool-128's.

On 4*4 tigerton machine, a similiar issue appears on another kmem_cache.

Function calculate_order uses 'min_objects /= 2;' to shrink. Plus size
calculation/checking in slab_order, sometimes above issue appear.

Below patch against 2.6.29-rc2 fixes it.

I checked the default orders of all kmem_cache and they don't become
smaller than before. So the patch wouldn't hurt performance.

Signed-off-by Zhang Yanmin <yanmin.zhang@linux.intel.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slub.c