Re: open(.. O_DIRECT ..) difference in between Linux and FreeBSD ..

From: Andries Brouwer (aebr@win.tue.nl)
Date: Thu Jun 12 2003 - 08:17:04 EST


On Thu, Jun 12, 2003 at 02:14:37PM +0300, Matti Aarnio wrote:

> I have been debugging long and hard a thing where IO is done
> with O_DIRECT flag applied to open(2).
>
> Unlike Linux, FreeBSD (where this flag originates, apparently) does
> _not_ require that read()/write() happens from page aligned memory
> areas, and/or be of page-size multiples in size.
>
> This needs at least wording in open(2) man-page

Ha Matti, I was going to suggest you to send a patch to the man page
maintainer, but maybe the wording you ask for is there already and
you just have some outdated version of the manpages?

Andries

       O_DIRECT
              Try to minimize cache effects of the I/O to and
              from this file. In general this will degrade per-
              formance, but it is useful in special situations,
              such as when applications do their own caching.
              File I/O is done directly to/from user space
              buffers. The I/O is synchronous, i.e., at the com-
              pletion of the read(2) or write(2) system call,
              data is guaranteed to have been transferred.
              Transfer sizes, and the alignment of user buffer
              and file offset must all be multiples of the logi-
              cal block size of the file system.

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



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:32 EST