From: Vlad H. <hv...@us...> - 2007-07-23 08:32:34
|
> > > Thanks for the reminder, I had forgot that part of your proposal... > > > > > > As I see in windows it will works exactly as I wish, but on linux I saw > > > it will use SYNC (works as FW = on) so the double caching will still be > > > in place on linux ? > > > > On posix it will use or O_DIRECT flag (trivial to implement) or > > posix_fadvise calls (need think more on it). > > > > I still don't know what is better as i can't test it > > O_DIRECT looks well for raw partitions, though not sure will it give some real > effect or not. AFAIU it will not use FS cache (or will almost not use it) - exactly what we want. Am i wrong ? > Also seems that we must allocate page on sector boundary to > make it work. Its already done. Tested in Windows but i guess it will work on Linux too ;) > What about fadvise... I do not see a good way to change > behaviour on the fly in MT system. I think about to call posix_fadvise(POSIX_FADV_DONTNEED and\or POSIX_FADV_NOREUSE) for every just read page, i.e. right after read call Regards, Vlad |