Skip to content
Snippets Groups Projects
Commit 2adea4fb authored by Yury Umanets's avatar Yury Umanets
Browse files

- fixed issue with long time not being scheduled pools thread. We need to...

- fixed issue with long time not being scheduled pools thread. We need to compensate that in lprocfs_rd_pool_state()
parent 1417f277
No related branches found
No related tags found
No related merge requests found
......@@ -352,17 +352,29 @@ static int lprocfs_rd_pool_state(char *page, char **start, off_t off,
int nr = 0, granted, grant_rate, cancel_rate;
int grant_speed, grant_plan, grant_step;
struct ldlm_pool *pl = data;
time_t recalc_interval_sec;
__u32 limit;
__u64 slv;
recalc_interval_sec = cfs_duration_sec(cfs_time_current() -
pl->pl_update_time);
if (recalc_interval_sec == 0)
recalc_interval_sec = 1;
spin_lock(&pl->pl_lock);
slv = pl->pl_server_lock_volume;
limit = ldlm_pool_get_limit(pl);
granted = atomic_read(&pl->pl_granted);
grant_rate = atomic_read(&pl->pl_grant_rate);
cancel_rate = atomic_read(&pl->pl_cancel_rate);
grant_speed = atomic_read(&pl->pl_grant_speed);
grant_rate = atomic_read(&pl->pl_grant_rate) /
recalc_interval_sec;
cancel_rate = atomic_read(&pl->pl_cancel_rate) /
recalc_interval_sec;
grant_speed = atomic_read(&pl->pl_grant_speed) /
recalc_interval_sec;
grant_plan = atomic_read(&pl->pl_grant_plan);
grant_plan += atomic_read(&pl->pl_grant_speed) -
(atomic_read(&pl->pl_grant_speed) /
recalc_interval_sec);
grant_step = atomic_read(&pl->pl_grant_step);
spin_unlock(&pl->pl_lock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment