[erlang-questions] Linux O_DIRECT flag

Valentin Micic valentin@REDACTED
Sat Mar 15 14:42:49 CET 2008

Funny thing... I was just reading this article when your e-mail arrived :-).
Yeah, there is a strong case not to use O_DIRECT -- at least I know now that 
is not going to happen through standard ERLANG distribution anyway.

The alternative:


looks like a good candidate for what I'm trying to do. Well, either way (as 
Christian S suggested) one would need to write a custom linked-in driver for 
this purpose -- which is not something I am looking forward to, but hey, 
life is not always easy.

Thanks to everyone involved -- it so great to have an access to such a 
bright bunch of people.


----- Original Message ----- 
From: "Frej Drejhammar" <frej.drejhammar@REDACTED>
To: "Valentin Micic" <valentin@REDACTED>
Cc: "Alpár Jüttner" <alpar@REDACTED>; <erlang-questions@REDACTED>
Sent: Saturday, March 15, 2008 1:32 PM
Subject: Re: Linux O_DIRECT flag

>> As far as implementing support for O_DIRECT flag: I suppose that a
>> proper place for it would be in "prim_file.erl"
>> open_mode/4. However, doing it on my own would mean that I have to
>> do it every time a new release is out.  Well, I'm not crazy about it
>> -- wouldn't it be far more convenient if this becomes a part of
>> standard release (pveeez). I mean, if O_DIRECT option exist, it is
>> there for a reason, so if someone is crazy (or stupid) enough to use
>> it, let him knock (him|her)self out, right?
> Start reading http://kerneltrap.org/node/7563 and follow the
> references for why O_DIRECT probably is not what you want on
> Linux. The article also gives hints on what to do (posix_fadvise +
> Regards,
> --Frej

More information about the erlang-questions mailing list