Re: Direct (unbuffered) I/O status ...

From: Steve Lord (
Date: Fri Feb 02 2001 - 12:08:26 EST

> We're trying to port some code that currently runs on SGI using the IRIX
> direct I/O facility. From searching the web, it appears that a similar
> feature either already is or will soon be available under Linux. Could
> anyone fill me in on what the status is?
> (I know about mapping block devices to raw devices, but that alone will
> not work for the application we're contemplating: we'd like conventional
> file-system support as well as unbuffered I/O capability).
> Thanks in advance!
> -Arun

I was going to let Stephen Tweedie respond to this one, but since he has
not got to it yet...

Yes there has been talk of implementing filesystem I/O direct between user
memory and the disk device. Stephen's approach was to use similar techniques to
the raw I/O path to lock down the user pages, these would then be placed
in the address space of the inode, and the filesystem would do its usual
thing in terms of read or write. There are lots of end cases to this
which make it more complex than it sounds, what happens if there is already
data in the cache, what happens if someone memory maps the file in the
middle of the I/O and lots of other goodies.

I suspect implementing this is quite a ways off yet, and almost certainly
a 2.5 feature for quite a while before it could possibly get into a 2.4

Stephen is the one to give a real explaination of how he sees this working
and when it might be done.

However, given the open source work SGI is doing with XFS, we are pretty much
committed to supporting O_DIRECT on Linux XFS before this. There is
a very basic implementation of O_DIRECT read in the current Linux XFS,
it has not been tested in quite some time (i.e. it may be broken), and it is
not coherent with the buffer cache. I hope we can have this cleaned up and
write implemented in the next month or so.

This would have the added advantage that even if you are moving stuff from
Irix to Linux, you could at least take your existing filesystems with you.


> --
> Arun Rao
> Pixar Animation Studios
> 1200 Park Ave
> Emeryville, CA 94608
> (510) 752-3526
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to
> Please read the FAQ at

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 21:00:15 EST