From 386e9768ee923fa926f106920fab245418eb7ca6 Mon Sep 17 00:00:00 2001 From: Vitaly Fertman Date: Tue, 21 Dec 2010 16:07:45 +0300 Subject: [PATCH] b=24320 do not fork a new thread in mem pressure i=johann i=green we already check for PF_MEMALLOC in ldlm shrinker and pass this flag to the blocking thread, but a new thread start was still done with no check for this flag. --- lustre/ldlm/ldlm_lockd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index b750b1c..f5fc1f8 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -2218,7 +2218,8 @@ static int ldlm_bl_thread_main(void *arg) /* Not fatal if racy and have a few too many threads */ if (unlikely(busy < blp->blp_max_threads && - busy >= cfs_atomic_read(&blp->blp_num_threads))) + busy >= cfs_atomic_read(&blp->blp_num_threads) && + !blwi->blwi_mem_pressure)) /* discard the return value, we tried */ ldlm_bl_thread_start(blp); } else { -- 1.8.3.1