summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-12-29 02:44:37 +0000
committerdyson <dyson@FreeBSD.org>1996-12-29 02:44:37 +0000
commitbaa03b956c25159833733ce567a847c13e9bd032 (patch)
treeb2aa4239586797edd5ac58576497d919af438876 /sys
parent5f299ee7718b583b973c7980e24f27dc06421eb8 (diff)
downloadFreeBSD-src-baa03b956c25159833733ce567a847c13e9bd032.zip
FreeBSD-src-baa03b956c25159833733ce567a847c13e9bd032.tar.gz
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 :-)).
Diffstat (limited to 'sys')
-rw-r--r--sys/gnu/ext2fs/ext2_readwrite.c3
-rw-r--r--sys/gnu/fs/ext2fs/ext2_readwrite.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c
index de13ed0..b96b8ad 100644
--- a/sys/gnu/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/ext2fs/ext2_readwrite.c
@@ -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,
diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c
index de13ed0..b96b8ad 100644
--- a/sys/gnu/fs/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/fs/ext2fs/ext2_readwrite.c
@@ -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,
OpenPOWER on IntegriCloud