This commit is the embodiment of some VFS read clustering improvements.

Firstly, now our read-ahead clustering is on a file descriptor basis and not
on a per-vnode basis.  This will allow multiple processes reading the
same file to take advantage of read-ahead clustering.  Secondly, there
previously was a problem with large reads still using the ramp-up
algorithm.  Of course, that was bogus, and now we read the entire
"chunk" off of the disk in one operation.   The read-ahead clustering
algorithm should use less CPU than the previous also (I hope :-)).
This commit is contained in:
John Dyson 1996-12-29 02:44:37 +00:00
parent 8596ee6d82
commit 87241caa43
2 changed files with 4 additions and 2 deletions

View file

@ -114,7 +114,8 @@ READ(ap)
error = bread(vp, lbn, size, NOCRED, &bp);
else if (doclusterread)
error = cluster_read(vp,
ip->i_size, lbn, size, NOCRED, &bp);
ip->i_size, lbn, size, NOCRED,
uio->uio_resid, (ap->a_ioflag >> 16), &bp);
else if (lbn - 1 == vp->v_lastr) {
int nextsize = BLKSIZE(fs, ip, nextlbn);
error = breadn(vp, lbn,

View file

@ -114,7 +114,8 @@ READ(ap)
error = bread(vp, lbn, size, NOCRED, &bp);
else if (doclusterread)
error = cluster_read(vp,
ip->i_size, lbn, size, NOCRED, &bp);
ip->i_size, lbn, size, NOCRED,
uio->uio_resid, (ap->a_ioflag >> 16), &bp);
else if (lbn - 1 == vp->v_lastr) {
int nextsize = BLKSIZE(fs, ip, nextlbn);
error = breadn(vp, lbn,