From 2ab13460852e65c2ec0e77000baba5e859a6a2cf Mon Sep 17 00:00:00 2001 From: Kirill Korotaev Date: Sat, 25 Mar 2006 03:07:45 -0800 Subject: [PATCH] [PATCH] Reduce sched latency in shrink_dcache_sb() This patch reduces scheduling latency in shrink_dcache_sb() noticed during remounting of big partitions with many cached dentries. The same latency fix was applied to select_parent() long ago. Signed-off-by: Denis Lunev Signed-off-by: Pavel Emelianov Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/dcache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/dcache.c b/fs/dcache.c index 0f7ec12d65..9395846485 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -489,6 +489,7 @@ repeat: continue; } prune_one_dentry(dentry); + cond_resched_lock(&dcache_lock); goto repeat; } spin_unlock(&dcache_lock); -- 2.39.5