From 2fb95b69dd601e0e17bcb348eef343a16f575488 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Wed, 19 May 2010 14:20:39 +0200 Subject: [PATCH] b=22476 set hard limit to grant_plan o=vitally i=johann i=dmitry The dlm_locks slab can grow significantly and consumes a lot of memory on the server. Cap grant_plan to an hardlimit. --- lustre/ChangeLog | 6 ++++++ lustre/ldlm/ldlm_pool.c | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 2d9594f..049e747 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -25,6 +25,12 @@ Details : Some positions if lfs quota output table could be empty or is put instead of space where there is not supposed to be any data. Severity : normal +Bugzilla : 22476 +Description: dlm lock slab shrinking is not efficient +Details : The dlm_locks slab can grow significantly and consumes a lot of + memory on the server. Set a hardlimit to grant_plan. + +Severity : normal Bugzilla : 15587/21439 Description: don't handle security.capability xattr Details : CONFIG_SECURITY_FILE_CAPABILITIES is enabled by default on SLES11. diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c index 1566c23..bc2ec69 100644 --- a/lustre/ldlm/ldlm_pool.c +++ b/lustre/ldlm/ldlm_pool.c @@ -239,6 +239,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; } /** @@ -274,10 +277,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