linux-dcache-cleanup-aggressively-to-avoid-having-too-many-vcache-entries-locked...
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Tue, 9 Oct 2001 01:07:41 +0000 (01:07 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 9 Oct 2001 01:07:41 +0000 (01:07 +0000)
less aggressive, though, than the "don't use the dcache at all" d_drop
solution i proposed.

src/afs/afs_vcache.c

index 4917b0d..bad48b2 100644 (file)
@@ -568,6 +568,10 @@ struct vcache *afs_NewVCache(struct VenusFid *afid, struct server *serverp,
         int vmax = 2 * afs_cacheStats;
         int vn = VCACHE_FREE;
 
+         AFS_GUNLOCK();
+        shrink_dcache_sb(afs_globalVFS);
+        AFS_GLOCK();
+
         i = 0;
         for(tq = VLRU.prev; tq != &VLRU && vn > 0; tq = uq) {
            tvc = QTOV(tq);