All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Leon Pollak <leon.pollak@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Old O_DIRECT story
Date: Tue, 6 Jan 2015 04:04:45 +0200	[thread overview]
Message-ID: <20150106020445.GB23775@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150105155210.4ac86388@lxorguk.ukuu.org.uk>

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

  reply	other threads:[~2015-01-06  2:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 13:31 Old O_DIRECT story Leon Pollak
2014-12-27 16:08 ` Theodore Ts'o
2015-01-05 15:52 ` One Thousand Gnomes
2015-01-06  2:04   ` Kirill A. Shutemov [this message]
2015-01-06  7:53     ` Leon Pollak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150106020445.GB23775@node.dhcp.inet.fi \
    --to=kirill@shutemov.name \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=leon.pollak@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.