]> git.michaelhowe.org Git - packages/o/openafs.git/commit
SOLARIS: Granular multiPage detection
authorAndrew Deason <adeason@sinenomine.net>
Wed, 29 Jun 2011 18:51:22 +0000 (13:51 -0500)
committerDerrick Brashear <shadow@dementia.org>
Sat, 9 Jul 2011 05:08:12 +0000 (22:08 -0700)
commit954442e207d8a05d2f26992ff966b56f7af41e1e
tree1f3901c4e4c3fde7a5d938c94bfc6761ee566c7d
parent42f8c24972976bc9bad46d3d97251be2a43ed458
SOLARIS: Granular multiPage detection

Currently, a struct vcache has a multiPage counter, indicating how
many afs_getpage requests are in-flight for that vcache that involve
retrieving multiple pages. Any dcache associated with such vcaches are
then avoided when choosing dcache entries to evict from the cache,
since we may deadlock when trying to evict a dcache entry from one of
the earlier afs_GetOnePage calls in a particular afs_getpage request.

This behavior can cause the client to become unusable if the cache
becomes full, and the only items in the cache are dcache entries in a
file that has an in-flight multi-page afs_getpage request. Since, in
that case, we cannot kick out any entries from the cache, and so we
wait forever to wait for the cache utilization to go down.

To prevent this from occurring, record exactly which ranges in the
file have in-flight multi-page afs_getpage requests, and just avoid
dcache entries in those ranges. This way afs_GetDownD can evict dcache
entries in the same file, but still avoid entries that would cause a
deadlock.

Also add some comments explaining this situation a bit more.

Change-Id: Idd39fd4811ea03aa7eee62f85f1a0c74c9c5e402
Reviewed-on: http://gerrit.openafs.org/4896
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 31a001f60e5fe729b315f679d1d43b367bd74ea5)
Reviewed-on: http://gerrit.openafs.org/4927
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/SOLARIS/osi_vcache.c
src/afs/SOLARIS/osi_vm.c
src/afs/SOLARIS/osi_vnodeops.c
src/afs/afs.h
src/afs/afs_dcache.c
src/afs/afs_prototypes.h