Re: bdi_threshold slow to reach steady state

Peter Zijlstra
2009-10-14T14:05:31Z

On Wed, 2009-10-14 at 14:55 +0100, Richard Kennedy wrote:
>
> commit 11735a2336ba08cf21aebf79a706c86aca5e44b2
> Author: Richard Kennedy <richard@rsk.demon.co.uk>
> Date: Wed Oct 14 14:46:21 2009 +0100
>
> mm: speed up per bdi dirty threshold calculations

I think the subject is confusing, we don't actually compute things
faster in the less cycles sense.

We reduce the dampening for the control system, yielding faster
convergence.

> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
>
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index a3b1409..018024e 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -144,7 +144,7 @@ static int calc_period_shift(void)
> else
> dirty_total = (vm_dirty_ratio *
> determine_dirtyable_memory()) /
> 100;
> - return 2 + ilog2(dirty_total - 1);
> + return ilog2(dirty_total - 1) - 2;
> }