Posted Feb 5, 2010 11:03 UTC (Fri) by farnz
In reply to: Pathological cases
Parent article: Improving readahead
That sort of situation is what posix_fadvise is meant for. If you know in advance that readahead will be wasted, posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM); tells the kernel not to bother.
In general, if you know that you have an abnormal access pattern ahead of time, the right call to posix_fadvise won't hurt you, and can help.
to post comments)