Windows: create scache->redirMx to reduce contention
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 15 Nov 2011 23:23:46 +0000 (18:23 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 16 Nov 2011 15:04:04 +0000 (07:04 -0800)
commit55f5f356af2ef884413bd656f100055741ae871b
tree7c8741ab6896a786ee23376328bdf541aa14fb69
parent042f6c08e3be0af3ef1cc4a0bfc4688c3e2ef7d0
Windows: create scache->redirMx to reduce contention

Relying on the cm_scache_t.rw lock to protect the cm_scache_t.redirQueue*
results in a large amount of contention between processing extent
requests and releases from the afs redirector and the threads attempting
to read from or write data to the file server.   There is no reason why
the same lock must be used.  Allocate a dedicated mutex to protect the
queue.

By placing the new mutex after the buf_globalLock in the locking
hierarchy it permits the lock acquisition logic for extent processing
to be simplified further reducing cm_scache_t.rw lock transitions.

Change-Id: Id2ded86c1f3757a2f1071c8cf39f2fbc6bcfcfaa
Reviewed-on: http://gerrit.openafs.org/6053
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsd/cm.h
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_memmap.h
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_scache.h
src/WINNT/afsrdr/user/RDRFunction.c