From 66a08e8975570fafbe3f7fd49a7acef3e5ea270b Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 31 Mar 2008 16:45:45 -0700 Subject: slub: pack objects denser Since we now have more orders available use a denser packing. Increase slab order if more than 1/16th of a slab would be wasted. Signed-off-by: Christoph Lameter --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2008-04-04 13:41:57.000000000 -0700 +++ linux-2.6/mm/slub.c 2008-04-04 14:16:31.000000000 -0700 @@ -1815,7 +1815,7 @@ static int slub_nomerge; * system components. Generally order 0 allocations should be preferred since * order 0 does not cause fragmentation in the page allocator. Larger objects * be problematic to put into order 0 slabs because there may be too much - * unused space left. We go to a higher order if more than 1/8th of the slab + * unused space left. We go to a higher order if more than 1/16th of the slab * would be wasted. * * In order to reach satisfactory performance we must ensure that a minimum @@ -1880,7 +1880,7 @@ static inline int calculate_order(int si if (!min_objects) min_objects = 4 * fls(nr_cpu_ids); while (min_objects > 1) { - fraction = 8; + fraction = 16; while (fraction >= 4) { order = slab_order(size, min_objects, slub_max_order, fraction);