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.
/* Not fatal if racy and have a few too many threads */
if (unlikely(busy < blp->blp_max_threads &&
/* 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 {
/* discard the return value, we tried */
ldlm_bl_thread_start(blp);
} else {