From: Alex P. <pes...@ma...> - 2007-07-26 06:11:25
|
On Wednesday 25 July 2007 17:30, Vlad Horsun wrote: > > I know various db "vendors" support direct I/O as a db option > > on Linux, using the current O_DIRECT implementation, but they > > had to be careful in their code to avoid certain O_DIRECT > > kernel bugs and race conditions. For example, it seems mixing > > O_DIRECT and non-O_DIRECT reads and writes on the same file > > simultaneously may result in stale data reads or writes. The > > workaround: don't do that! > > posix_fadvise free from this drawback and not restrict us to use > aligned memory buffers, right ? But lucks one more important support - direct I/O from/to user space. I suggest we begin with O_DIRECT, and only in case it has serious problems try with posix_fadvise(). This is even more important taking into an account that 2.4 kernels do not support posix_fadvise(). |