Whamcloud - gitweb
LU-11518 ldlm: lru code cleanup 06/41006/2
authorVitaly Fertman <c17818@cray.com>
Wed, 16 Dec 2020 16:50:46 +0000 (11:50 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Apr 2021 04:42:02 +0000 (04:42 +0000)
commit2fd278af4caeb49ace25546c91e18b602e821042
treee465422790a0b8aaf43a0f63b2fa5b9717bdd546
parenteaee7c3cd636720fb925656f51c9a68c507849f6
LU-11518 ldlm: lru code cleanup

cleanup includes:
 - no need in unused locks parameter in the lru policy, better to
   take the current value right in the policy if needed;
 - no need in a special SHRINKER policy, the same as the PASSED one
 - no need in a special DEFAULT policy, the same as the PASSED one;
 - no need in a special PASSED policy, LRU is to be cleaned anyway
   according to LRU resize or AGED policy;

bug fixes:
 - if the @min amount is given, it should not be increased on the
   amount of locks exceeding the limit, but the max of them is to
   be taken instead;
 - do not do ELC on enqueue if no LRU limits are reached;
 - do not keep lock in LRUR policy once we have cancelled @min locks,
   try to cancel instead until we reach the @max limit if given;
 - cancel locks from LRU with the new policy, if changed in sysfs;

Lustre-change: https://review.whamcloud.com/39560
Lustre-commit: 209a112eb153b4cc7429d70685a3bc2d7f51e45f

Signed-off-by: Vitaly Fertman <c17818@cray.com>
Change-Id: I84369da54f680e5fbddd28089c40d1b90722d42d
HPE-bug-id: LUS-8678
Reviewed-on: https://es-gerrit.dev.cray.com/157066
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/41006
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
lustre/ldlm/ldlm_internal.h
lustre/ldlm/ldlm_pool.c
lustre/ldlm/ldlm_request.c
lustre/ldlm/ldlm_resource.c