From fa4b1f3aeb33c28b2d8e2724542d1696fcc87773 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 21 Dec 2010 10:31:39 -0500 Subject: [PATCH] LINUX: Avoid unnecessary afs_ShakeLooseVCaches Before some of the NewVCache refactoring, we only called afs_ShakeLooseVCaches when afs_vcount was over (or equal to) afs_maxvcount. Do this again, so we only try to shake loose vcaches when we need more vcaches. Otherwise, we will call afs_ShakeLooseVCaches every single time we want a new vcache when dynamic vcaches are disabled (such as 2.4 Linux), and we log a warning when we can't free any (which is likely when there are only 1 or 2 vcaches in use). FIXES 128756 Change-Id: Ia06f76a6f719e69881b91fb2d975cfc33c85c370 Reviewed-on: http://gerrit.openafs.org/3569 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/afs/afs_vcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 8502d6a..091a8a8 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -798,7 +798,7 @@ afs_NewVCache_int(struct VenusFid *afid, struct server *serverp, int seq) afs_FlushReclaimedVcaches(); #if defined(AFS_LINUX22_ENV) - if(!afsd_dynamic_vcaches) { + if(!afsd_dynamic_vcaches && afs_vcount >= afs_maxvcount) { afs_ShakeLooseVCaches(anumber); if (afs_vcount >= afs_maxvcount) { afs_warn("afs_NewVCache - none freed\n"); -- 1.9.4