lkml.org 
[lkml]   [2015]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Old O_DIRECT story
On Mon, Jan 05, 2015 at 03:52:10PM +0000, 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, kernel and
> > DMA actually compete on the RAM area to fill it - one with garbage, one
> > with actual data. Kernel wins.
> >
> > So, how to implement Linus's advice?
>
> Use O_DIRECT. There are lots of problems with the mmap() model, in
> particular with how mmu table changes scale to large numbers of CPU
> threads (ie they don't).

They do. Kinda. See split page table lock.
But, yeah, mmap() approach should not be faster anyway.

--
Kirill A. Shutemov


\
 
 \ /
  Last update: 2015-01-06 03:21    [W:0.081 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site