summaryrefslogtreecommitdiff
path: root/fs/ext2
diff options
context:
space:
mode:
authorAndrew Morton <akpm@zip.com.au>2002-07-14 03:24:40 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-07-14 03:24:40 -0700
commit42ec8bc1d0bd11f0ebcb05c4c4a02065c08f4e73 (patch)
treec08d69e317566c25880498c36b072a54c1927eff /fs/ext2
parent2dbd15029c00ec56983a240a98306e8ea4101baa (diff)
[PATCH] direct-to-BIO for O_DIRECT
Here's a patch which converts O_DIRECT to go direct-to-BIO, bypassing the kiovec layer. It's followed by a patch which converts the raw driver to use the O_DIRECT engine. CPU utilisation is about the same as the kiovec-based implementation. Read and write bandwidth are the same too, for 128k chunks. But with one megabyte chunks, this implementation is 20% faster at writing. I assume this is because the kiobuf-based implementation has to stop and wait for each 128k chunk, whereas this code streams the entire request, regardless of its size. This is with a single (oldish) scsi disk on aic7xxx. I'd expect the margin to widen on higher-end hardware which likes to have more requests in flight. Question is: what do we want to do with this sucker? These are the remaining users of kiovecs: drivers/md/lvm-snap.c drivers/media/video/video-buf.c drivers/mtd/devices/blkmtd.c drivers/scsi/sg.c the video and mtd drivers seems to be fairly easy to de-kiobufize. I'm aware of one proprietary driver which uses kiobufs. XFS uses kiobufs a little bit - just to map the pages. So with a bit of effort and maintainer-irritation, we can extract the kiobuf layer from the kernel.
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/inode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index b6678139657b..798875bd134e 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -607,11 +607,10 @@ static int ext2_bmap(struct address_space *mapping, long block)
}
static int
-ext2_direct_IO(int rw, struct inode *inode, struct kiobuf *iobuf,
- unsigned long blocknr, int blocksize)
+ext2_direct_IO(int rw, struct inode *inode, char *buf,
+ loff_t offset, size_t count)
{
- return generic_direct_IO(rw, inode, iobuf, blocknr,
- blocksize, ext2_get_block);
+ return generic_direct_IO(rw, inode, buf, offset, count, ext2_get_block);
}
static int