From ad87adbff5148a74ac616dbc9bfa02a4e3814034 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Fri, 14 Nov 2014 17:07:37 -0800 Subject: [PATCH] LU-5727 ldlm: revert the changes for lock canceling policy The changes for LRU lock policy was introduced by commit bfae5a4e, where I was trying to revise the policy to pick locks for canceling. However, this caused two problems as mentioned in LU-5727. The first problem is that the lock can only be picked for canceling only if the number of LRU locks is over preset LRU number AND it's aged; the second problem is that mdc_cancel_weight() tends to not cancel OPEN locks, therefore open locks can be kept forever and finally exhausts memory on the MDT side. The first problem is fixed by patch e8812867. This patch will revert the rest of changes related to LRU policy revise. Signed-off-by: Jinshan Xiong Change-Id: Ie1dbcd15dc6e739d01ddcae01d7e637688a1d4b2 Reviewed-on: http://review.whamcloud.com/12733 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- lustre/ldlm/ldlm_request.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index 25e1b4d..bd33d9e 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -1500,9 +1500,6 @@ static ldlm_policy_res_t ldlm_cancel_lrur_policy(struct ldlm_namespace *ns, if (slv == 0 || lv < slv) return LDLM_POLICY_KEEP_LOCK; - if (ns->ns_cancel != NULL && ns->ns_cancel(lock) == 0) - return LDLM_POLICY_KEEP_LOCK; - return LDLM_POLICY_CANCEL_LOCK; } @@ -1545,9 +1542,6 @@ static ldlm_policy_res_t ldlm_cancel_aged_policy(struct ldlm_namespace *ns, cfs_time_add(lock->l_last_used, ns->ns_max_age))) return LDLM_POLICY_KEEP_LOCK; - if (ns->ns_cancel != NULL && ns->ns_cancel(lock) == 0) - return LDLM_POLICY_KEEP_LOCK; - return LDLM_POLICY_CANCEL_LOCK; } -- 1.8.3.1