Backport fix for LU-1128 to 1.8:
For ldlm server pool shrinker, we just use it to decrease SLV,
but never reclaim any memory directly, so it should always return
-1 to inform the kernel to break the shrink loop.
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I1c841e7485375017d33e93c59f2318318fae299c
Reviewed-on: http://review.whamcloud.com/3138
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
cached += ldlm_pool_granted(&ns->ns_pool);
ldlm_namespace_put(ns, 1);
}
- return cached;
+ /* we only decrease the SLV in server pools shrinker, return -1 to
+ * kernel to avoid needless loop. LU-1128 */
+ return (client == LDLM_NAMESPACE_SERVER) ? -1 : cached;
}
static int ldlm_pools_srv_shrink(SHRINKER_FIRST_ARG int nr_to_scan,