From a12662ac983309c1d76abe002498074c6ca460b3 Mon Sep 17 00:00:00 2001 From: Vitaly Fertman Date: Thu, 26 Aug 2010 17:31:45 +0400 Subject: [PATCH] b=22476 grant_plan upper hard limit. i=johann i=dmitry --- lustre/ldlm/ldlm_pool.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c index 25fe64e..98b9215 100644 --- a/lustre/ldlm/ldlm_pool.c +++ b/lustre/ldlm/ldlm_pool.c @@ -238,6 +238,9 @@ static inline void ldlm_pool_recalc_grant_plan(struct ldlm_pool *pl) grant_step = ldlm_pool_t2gsp(pl->pl_recalc_period); grant_step = ((limit - granted) * grant_step) / 100; pl->pl_grant_plan = granted + grant_step; + limit = (limit * 5) >> 2; + if (pl->pl_grant_plan > limit) + pl->pl_grant_plan = limit; } /** @@ -273,10 +276,6 @@ static inline void ldlm_pool_recalc_slv(struct ldlm_pool *pl) */ slv_factor = (grant_usage << LDLM_POOL_SLV_SHIFT); do_div(slv_factor, limit); - if (2 * abs(granted - limit) > limit) { - slv_factor *= slv_factor; - slv_factor = dru(slv_factor, LDLM_POOL_SLV_SHIFT, round_up); - } slv = slv * slv_factor; slv = dru(slv, LDLM_POOL_SLV_SHIFT, round_up); -- 1.8.3.1