Cache bypass: switch to rx_Readv
authorMarc Dionne <marc.c.dionne@gmail.com>
Wed, 24 Nov 2010 00:08:24 +0000 (19:08 -0500)
committerDerrick Brashear <shadow@dementia.org>
Mon, 29 Nov 2010 05:22:51 +0000 (21:22 -0800)
commit4a2d1973fc5c2aac05beef5d64e7a486757c54af
tree48075bd767b9ee27e0d31c6757d951c2bc553cca
parent3f69d7247cfbd809aeed1e4d943c2b21da035654
Cache bypass: switch to rx_Readv

Tests show that cache bypass doesn't scale very well past a few
concurrent processes, with a lot of lock contention in the RX
layer.  Switching the implementation to the iovec based rx_Readv
alleviates much of this.

Also take advantage of the fact that the upper layer readpages
only sends down contiguous lists of pages, and issue larger read
requests and populate the pagecache pages from the iovecs we
get back.  The loop logic is changed significantly to accomodate
the new pattern.

Read throughput is improved by about 30-40% for some parallel read
benchmarks I use.  Along with some other tweaks, it can allow the
throughput to be more than doubled.

Change-Id: I56877ec15eba035429bd4ea32731687c862f151f
Reviewed-on: http://gerrit.openafs.org/3375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_bypasscache.c