From: Vitaly Fertman Date: Tue, 21 Dec 2010 13:07:45 +0000 (+0300) Subject: b=24320 do not fork a new thread in mem pressure X-Git-Tag: 2.0.59-llnl-base~12 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=386e9768ee923fa926f106920fab245418eb7ca6;p=fs%2Flustre-release.git 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. --- 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 {