[PATCH v2 02/28] vmscan: take at least one pass with shrinkers
glommer at parallels.com
Wed Apr 10 07:32:38 UTC 2013
On 04/10/2013 09:09 AM, Ric Mason wrote:
>> Before it, we will try to shrink 512 objects and succeed at 0 (because
>> > batch is 1024). After this, we will try to free 512 objects and succeed
>> > at an undefined quantity between 0 and 512.
> Where you get the magic number 512 and 1024? The value of SHRINK_BATCH
> is 128.
This is shrinker-defined. For instance, the super-block shrinker reads:
s->s_shrink.shrink = prune_super;
s->s_shrink.batch = 1024;
And then vmscan:
long batch_size = shrinker->batch ? shrinker->batch
I am dealing too much with the super block shrinker these days, so I
just had that cached in my mind and forgot to check the code and be more
In any case, that was a numeric example that is valid nevertheless.
More information about the Containers