Re: [patch 2/3] slub: scan partial list for free slabs whenthrashing

From: David Rientjes
Date: Mon Mar 30 2009 - 16:23:50 EST


On Mon, 30 Mar 2009, Christoph Lameter wrote:

> > Whenever a cpu cache satisfies a fastpath allocation, a fastpath counter
> > is incrememted. This counter is cleared whenever the slowpath is
> > invoked. This tracks how many fastpath allocations the cpu slab has
> > fulfilled before it must be refilled.
>
> That adds fastpath overhead and it shows for small objects in your tests.
>

Indeed, which is unavoidable in this case. The only other way of tracking
the "thrashing history" I can think of would be bitshifting a 1 for
slowpath and 0 for fastpath, for example, into an unsigned long. That,
however, requires a hamming weight calculation in the slowpath and doesn't
scale nearly as well as simply an incrementing a counter.

If there's other approaches on tracking such instances, I'd be interested
to hear them.

Btw, is cl@xxxxxxxxx your new email address or are all
linux-foundation.org emails going to eventually migrate to the new domain?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/