Whamcloud - gitweb
LU-11672 ldlm: awalys cancel aged locks regardless enabling or disabling lru resize 60/35660/2
authorGu Zheng <gzheng@ddn.com>
Thu, 11 Jul 2019 05:52:38 +0000 (13:52 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 11 Aug 2019 23:33:34 +0000 (23:33 +0000)
commit67e3ad553c3e0d6759402692a0f0a51fe42191e6
tree0a09b3cf9a4f1f434e1b6d2fee72299f836590e0
parent3565d9db48e4ec098c7e976c916cd57727034505
LU-11672 ldlm: awalys cancel aged locks regardless enabling or disabling lru resize

Currently cancelling aged locks is handled by of ldlm_pool_recalc routine,
and it only works when lru resize is enabled, means if we disabled lru
resize, old aged locks are still cached even though they reach the
ns_max_age.

But theoretically, even lru resize disabled, lru_max_age should behave
same as enabling lru resize. At the end, lru_size is like hard limit of
number of locks, but ns_max_age/lru_max_age is a elimination mechanism,
regardless enabling or disabling lru resize meaning once it gets
lru_max_age, locks need to be cancelled.

So fix it here with changing the lru flags when invoking ldlm_cancel_lru
to do the real cancel work, if lru resize is enabled, set flag to
LDLM_LRU_FLAG_LRUR, otherwise LDLM_LRU_FLAG_AGED.

Lustre-change: https://review.whamcloud.com/35467
Lustre-commit: e4c490bac7701435cb08ce444d9b23b8fd1dd839

Change-Id: Ic2df2550af87fd7209fdb31ca3730683d727a74d
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/35660
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_pool.c
lustre/tests/sanity.sh