Skip to contentSkip to conversation

Reduce sched latency in shrink_dcache_sb()

PATCH New Kirill Korotaev 1 participant 1 message Mar 9, 2006 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Thanks,
Kirill

fs/dcache.c renamed from fs/dcache.c.lat +1 -0
@@ -491,6 +491,7 @@ repeat:
 			continue;
 		}
 		prune_one_dentry(dentry);
+		cond_resched_lock(&dcache_lock);
 		goto repeat;
 	}
 	spin_unlock(&dcache_lock);