lkml.org 
[lkml]   [2009]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/3] slub: add per-cache slab thrash ratio
On Tue, 31 Mar 2009, Christoph Lameter wrote:

> > @@ -3833,7 +3830,9 @@ static ssize_t order_store(struct kmem_cache *s,
> > if (order > slub_max_order || order < slub_min_order)
> > return -EINVAL;
> >
> > + thrash_ratio = s->min_free_watermark * 100 / oo_objects(s->oo);
> > calculate_sizes(s, order);
> > + s->min_free_watermark = oo_objects(s->oo) * thrash_ratio / 100;
> > return length;
> > }
> >
>
> Hmmm.. Still calculating the trash ratio based on existing objects per
> slab and then resetting the objects per slab to a different number.
> Shouldnt the trash_ratio simply be zapped to an initial value if the
> number of objects per slab changes?
>

Each cache with >= 20 objects per slab will get a default
slab_thrash_ratio of 20 in v2 of the series. If the order of a cache is
subsequently tuned, the default slab_thrash_ratio would be cleared without
knowledge to the user.

I'd agree that it should be cleared if the tunable had object units
instead of a ratio, but the ratio simply applies to any given order.


\
 
 \ /
  Last update: 2009-03-31 19:25    [W:1.197 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site