From 508b02b44acab55d6b6d7aeb35575534a3567b86 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 31 Mar 2008 16:45:45 -0700 Subject: [PATCH] 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. This further increases the orders used for slab caches. It saves memory for slabs from which we frequently allocate and increases the fastpath use because more objects are allocatable from a single slab page. May cause more half empty slab pages though. Signed-off-by: Christoph Lameter --- mm/slub.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index c0f5760..08effb6 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1853,7 +1853,7 @@ static inline int calculate_order(int size) 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); -- 1.5.4.4