Re: Should raw I/O be added to the kernel?

Kenneth Preslan (kpreslan@zarniwoop.com)
Fri, 22 Jan 1999 22:37:45 -0600 (EST)


I would really like raw I/O to make it into the Linux kernel. Not for
consistency on a raw partition, but for speed through a filesystem.

I can get ~40 MB/s off of a 8-way striped FC array through GFS (on Linux).
On an SGI O2, I can get ~80 MB/s with the same array when using Direct I/O
(their version of raw I/O). I believe a big part of the difference in speeds
is the memory copy from the buffer cache to user memory.

I would really like a good interface that would allow a filesystem to bypass
the buffer cache on big file data.

Ken Preslan

(GFS web page: http://gfs.lcse.umn.edu)

>
> Hi,
>
> On Mon, 21 Dec 1998 22:33:06 +0100 (MET), Gerard Roudier
> <groudier@club-internet.fr> said:
>
> > If you want performances, then you also want to queue several IOs to the
> > device at a time, each time it is possible. Imagine now, that you got an
> > IO error on some IO currently being processed by the device. ...
>
> >> Exactly right. Without raw disk IO, you couldn't guarantee a database
> >> to always be in a consistent state on the disk (i.e. it isn't very
>
> > I reply you that even with raw disk IO, it is not that easy to _really_
> > guarantee such a consistency without being _really_ aware of what may
> > _really_ happen with _real_ IOs, and that _real_ IO system services
> > are generally too poor to allow full control on what _really_ happens
> > with IOs.
>
> Yes you can. The way these applications work is to write all of the
> data for a commit, and to wait for it to complete before finally writing
> a commit record. That way, provided the OS does not acknowledge the
> write before it actually reaches the disk, the application can guarantee
> enough about the write ordering to be sure about data consistency. Raw
> IO, O_SYNC and fsync() provide enough support for the application to get
> this right, but fsync() does not provide guaranteed IO error
> notification so is not sufficient in the presence of errors.
>
> --Stephen
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/