<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">On Sun, Aug 26, 2018 at 9:23 AM Valentin Micic <<a href="mailto:v@pharos-corp.com">v@pharos-corp.com</a>> wrote:</span><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, <br>
<br>
Would it be possible for someone to shed a bit more light on various posix_file_advise() options in file:advise/4 function?<br>
<br>
</blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">It binds to the posix_fadvise(2) call If I remember correctly. Thus, the actual behavior is dependent on your operating system. FreeBSD ignores SEQUENTIAL for instance, because its default semantics autodetects sequential access. FreeBSD can also handle a WILL_NEED by async loading that data. NetBSD ignores the offset and len in some cases and applies it to the whole file. OpenBSD doesn't support the call at all it seems. Illumos supports the call, but does so in libc, detects that the parameters are valid, and then does nothing with the information. This is compliant with the specification.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">In most cases, you want to carefully measure before toying with these interfaces.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><br></div></div></div>