From: Kirill Korotaev Date: Sat, 25 Mar 2006 11:07:45 +0000 (-0800) Subject: [PATCH] Reduce sched latency in shrink_dcache_sb() X-Git-Tag: v2.6.17-rc1~789 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ab13460852e65c2ec0e77000baba5e859a6a2cf;p=linux-2.6 [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 --- 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);