From: Christopher J. Morrone Date: Thu, 6 Jan 2011 01:07:49 +0000 (-0800) Subject: LU-25: Use LDLM_ASYNC with ldlm_cancel_lru to avoid blocking. X-Git-Tag: 2.0.60.0~38 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3dcb5fb7b79949d780bc82b1439622989516e34f LU-25: Use LDLM_ASYNC with ldlm_cancel_lru to avoid blocking. Have ldlm_cli_pool_shrink() call ldlm_cancel_lru() with the LDLM_ASYNC option to have the blocking callback handled in another thread. This will avoid randomly blocking for excessively long times when the shrinker is called. Change-Id: Ide705df2640a2a96be554ffc452930a2e180fc20 Signed-off-by: Christopher J. Morrone Reviewed-on: http://review.whamcloud.com/277 Tested-by: Hudson Reviewed-by: Oleg Drokin --- diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c index 6d3cf0d..1219b39 100644 --- a/lustre/ldlm/ldlm_pool.c +++ b/lustre/ldlm/ldlm_pool.c @@ -551,7 +551,7 @@ static int ldlm_cli_pool_shrink(struct ldlm_pool *pl, cfs_spin_unlock(&ns->ns_lock); if (nr) { - canceled = ldlm_cancel_lru(ns, nr, LDLM_SYNC, + canceled = ldlm_cancel_lru(ns, nr, LDLM_ASYNC, LDLM_CANCEL_SHRINK); } #ifdef __KERNEL__