From 031001f0d438cf4c6b05331a5ab368c45b1b2e90 Mon Sep 17 00:00:00 2001 From: Ann Koehler Date: Wed, 7 Jun 2017 14:28:03 -0500 Subject: [PATCH] LU-10649 llite: yield cpu after call to ll_agl_trigger The statahead and agl threads loop over all entries in the directory without yielding the CPU. If the number of entries in the directory is large enough then these threads may trigger soft lockups. The fix is to add calls to cond_resched() after calling ll_agl_trigger(), which gets the glimpse lock for a file. Change-Id: I4fbc72a3c6bc77f2ffd8e3fd0daf4c8906bb954a Cray-bug-id: LUS-2584 Signed-off-by: Chris Horn Reviewed-on: https://review.whamcloud.com/31240 Reviewed-by: Patrick Farrell Reviewed-by: Sergey Cheremencev Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/llite/statahead.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/llite/statahead.c b/lustre/llite/statahead.c index a5d93ed..2da5070 100644 --- a/lustre/llite/statahead.c +++ b/lustre/llite/statahead.c @@ -925,6 +925,7 @@ static int ll_agl_thread(void *arg) list_del_init(&clli->lli_agl_list); spin_unlock(&plli->lli_agl_lock); ll_agl_trigger(&clli->lli_vfs_inode, sai); + cond_resched(); } else { spin_unlock(&plli->lli_agl_lock); } @@ -1112,7 +1113,7 @@ static int ll_statahead_thread(void *arg) ll_agl_trigger(&clli->lli_vfs_inode, sai); - + cond_resched(); spin_lock(&lli->lli_agl_lock); } spin_unlock(&lli->lli_agl_lock); -- 1.8.3.1