diff options
author | jhb <jhb@FreeBSD.org> | 2011-12-01 18:46:28 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-12-01 18:46:28 +0000 |
commit | 6dededc9d9b8ff37baca7218771cf7f312faa770 (patch) | |
tree | 86e27fc2525d8b8b9d0b5523cfcc47784d3e8447 /etc | |
parent | 34790eafe042b2eeedd8503778544f84c30aa2e4 (diff) | |
download | FreeBSD-src-6dededc9d9b8ff37baca7218771cf7f312faa770.zip FreeBSD-src-6dededc9d9b8ff37baca7218771cf7f312faa770.tar.gz |
Enhance the sequential access heuristic used to perform readahead in the
NFS server and reuse it for writes as well to allow writes to the backing
store to be clustered.
- Use a prime number for the size of the heuristic table (1017 is not
prime).
- Move the logic to locate a heuristic entry from the table and compute
the sequential count out of VOP_READ() and into a separate routine.
- Use the logic from sequential_heuristic() in vfs_vnops.c to update the
seqcount when a sequential access is performed rather than just
increasing seqcount by 1. This lets the clustering count ramp up
faster.
- Allow for some reordering of RPCs and if it is detected leave the current
seqcount as-is rather than dropping back to a seqcount of 1. Also,
when out of order access is encountered, cut seqcount in half rather than
dropping it all the way back to 1 to further aid with reordering.
- Fix the new NFS server to properly update the next offset after a
successful VOP_READ() so that the readahead actually works.
Some of these changes came from an earlier patch by Bjorn Gronwall that was
forwarded to me by bde@.
Discussed with: bde, rmacklem, fs@
Submitted by: Bjorn Gronwall (1, 4)
MFC after: 2 weeks
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions