From: Kirill Korotaev Date: Sat, 25 Mar 2006 11:07:45 +0000 (-0800) Subject: [PATCH] Reduce sched latency in shrink_dcache_sb() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2ab13460852e65c2ec0e77000baba5e859a6a2cf;p=openwrt%2Fstaging%2Fblogic.git [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 0f7ec12d65ff..939584648504 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);