Whamcloud - gitweb
LU-25: Use LDLM_ASYNC with ldlm_cancel_lru to avoid blocking.
authorChristopher J. Morrone <morrone2@llnl.gov>
Thu, 6 Jan 2011 01:07:49 +0000 (17:07 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 13 Apr 2011 12:44:17 +0000 (05:44 -0700)
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 <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/277
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_pool.c

index 6d3cf0d..1219b39 100644 (file)
@@ -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__