From b913c3793072f10d4c1192875130c51b588a0b1d Mon Sep 17 00:00:00 2001 From: Vitaly Fertman Date: Wed, 26 Jan 2011 18:22:15 +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 7ae30fe..69121ff 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -2006,7 +2006,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 >= atomic_read(&blp->blp_num_threads))) + busy >= 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