Re: Old O_DIRECT story

2015-01-05 Thread Leon Pollak
IMHO(!): 1. It will be slower, as pre-fill takes its significant time. 2. DMA-Kernel competition makes this method unusable. On 6 January 2015 at 04:04, Kirill A. Shutemov wrote: > On Mon, Jan 05, 2015 at 03:52:10PM +, One Thousand Gnomes wrote: >> > I tried in all ways to implement this with

Re: Old O_DIRECT story

2015-01-05 Thread Kirill A. Shutemov
On Mon, Jan 05, 2015 at 03:52:10PM +, One Thousand Gnomes wrote: > > I tried in all ways to implement this with mmap(), but it does not success, > > because I did not find a way to mmap() file as O_WRONLY. Mapping as O_RDWR > > makes kernel to pre-fill mapped memory with partition data. So, ker

Re: Old O_DIRECT story

2015-01-05 Thread One Thousand Gnomes
> I tried in all ways to implement this with mmap(), but it does not success, > because I did not find a way to mmap() file as O_WRONLY. Mapping as O_RDWR > makes kernel to pre-fill mapped memory with partition data. So, kernel and > DMA actually compete on the RAM area to fill it - one with garbag

Re: Old O_DIRECT story

2014-12-27 Thread Theodore Ts'o
On Sat, Dec 27, 2014 at 03:31:26PM +0200, Leon Pollak wrote: > Hi, all. > There was a discussion here: > https://lkml.org/lkml/2007/1/10/231 > > Linus wrote in this discussion: > "So don't use O_DIRECT. Use things like madvise() and posix_fadvise() > instead" > > After the full week of tests, sea

Old O_DIRECT story

2014-12-27 Thread Leon Pollak
Hi, all. There was a discussion here: https://lkml.org/lkml/2007/1/10/231 Linus wrote in this discussion: "So don't use O_DIRECT. Use things like madvise() and posix_fadvise() instead" After the full week of tests, searches, discussions, I have impudence to turn to the community - has one tried t