lkml.org 
[lkml]   [2003]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: open(.. O_DIRECT ..) difference in between Linux and FreeBSD ..
Date
From

Andries Brouwer wrote:
> 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.

FYI:
It appears that somewhere between RH kernels 2.4.18-27.7.x and 2.4.20-18.9
something has changed so that my application needs a O_SYNC too besides
the O_DIRECT to make sure that writes will be synchronous. If I leave
the O_SYNC out with 2.4.20-18.9 the write will happen physically 35
seconds after the write() was done.

Haven't tested with a vanilla 2.4.* kernel yet but will try.
(All modern 2.4.2? kernels I tried will hang for > 30s during boot while
probing the CompactFlash and are because of that kind of useless: my
application needs a 5s boot-time ..)

greetings,
Rob van Nieuwkerk
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.065 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site