public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@novell.com>
To: Bill Davidsen <davidsen@tmr.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: mmap vs. O_DIRECT
Date: Thu, 11 Nov 2004 10:41:56 -0500	[thread overview]
Message-ID: <1100187716.5358.5.camel@localhost> (raw)
In-Reply-To: <41937C1A.30800@tmr.com>

On Thu, 2004-11-11 at 09:50 -0500, Bill Davidsen wrote:

> I miss your point about synchronous, with hundreds of clients doing 
> small reads against a 10TB database, the benefit of pushing them through 
> the page cache isn't obvious. No particular data are in memory long 
> enough to have much chance of being shared, so it looks like overhead to 
> me. Feel free to educate me.

There is a difference between being synchronous and not going through
the page cache, although in Linux we don't really have the distinction.

> I certainly DO want to put more users per server, and direct I/O has 
> proven itself in actual use. I'm not sure why you think the double copy 
> is a good thing, but I have good rea$on to want more users per server.
> 
> Alan: point on MAP_SHARED taken.

BTW, Alan's point on MAP_SHARED is just that you can have the mmap
region and the page cached region be one and the same.  You still aren't
doing direct I/O.

Maybe that is ultimately what you want.

It is rare to see direct I/O perform better when you use it as normal
file I/O (e.g. don't perform your own caching and scheduling) but if you
really do measure improvements, and if you never reaccess the data (and
thus the lack of cache is not a problem), then by all means use it.

But we still don't want to make normal mmap's be direct.

	Robert Love



  reply	other threads:[~2004-11-11 15:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-10  0:05 mmap vs. O_DIRECT Bill Davidsen
2004-11-10 21:13 ` Robert Love
2004-11-11 14:50   ` Bill Davidsen
2004-11-11 15:41     ` Robert Love [this message]
2004-11-11 17:13       ` Robert Love
2004-11-11 17:19         ` Avi Kivity
2004-11-11 17:22           ` Robert Love
2004-11-10 22:19 ` Alan Cox

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=1100187716.5358.5.camel@localhost \
    --to=rml@novell.com \
    --cc=davidsen@tmr.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox