[erlang-questions] Linux O_DIRECT flag

Christian S chsu79@REDACTED
Sat Mar 15 12:22:07 CET 2008

>  After a brief investigation regarding ones ability to bypass the cache
>  (performed by our hardware supplier), I've been told that an application may
>  bypass the cache by porviding additional flag to "open" system call --
>  O_DIRECT to be more specific. I assume that file:open/2 does not support
>  this flag, so I'd like to ask, before we start hacking around:  is there an
>  easy way to expose this flag, and would you consider it for inclusion in one
>  of the next releases. Provided that O_DIRECT does what we think it does, of
>  course.

It seems like O_DIRECT requires userspace buffers to be page-aligned.
That might be another problem other than just passing O_DIRECT to the
open syscall.

My guess is that you want to write your own loadable driver to make
use of these os-specific features.

More information about the erlang-questions mailing list