public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Lord <lord@sgi.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: O_DIRECT read and holes in 2.5.26
Date: 26 Jul 2002 15:22:37 -0500	[thread overview]
Message-ID: <1027714959.1728.26.camel@localhost.localdomain> (raw)
In-Reply-To: <3D3B6D57.BB5C0F38@zip.com.au>

On Sun, 2002-07-21 at 21:26, Andrew Morton wrote:
> Stephen Lord wrote:
> > 
> > Andrew,
> > 
> > Did you realize that the new O_DIRECT code in 2.5 cannot read over holes
> > in a file.
> 
> Well that was intentional, although I confess to not having
> put a lot of thought into the decision.  The user wants
> O_DIRECT and we cannot do that.  The CPU has to clear the
> memory by hand.  Bad.

What it does mean is that things which used to work on Irix and
Linux now no longer work. You can write an app on 2.4 and have
it fail on 2.5 now.

> 
> Obviously it's easy enough to put in the code to clear the
> memory out.  Do you think that should be done?
>   
> >  The old code filled the user buffer with zeros, the new code
> > returned EINVAL if the getblock function returns an unmapped buffer.
> > With this exception, XFS does work with the new code - with more cpu
> > overhead than before due to the once per page getblock calls.
> 
> OK, thanks.  Presumably XFS has a fairly heavyweight get_block()?

No, not really that expensive, especially in the read and buffered
write path. I am objecting to the extra cpu cycles which we get to
spend in the kernel doing processing we do not need, as opposed to
spending those cycles in an application. It does not really show
up as a difference when you are sitting around waiting for the 
I/O, but if you are doing processing in parallel with the I/O
I prefer to put as many cycles in user space as possible. We have
customers who like to see 99.x% of their cpu time in user space.

> 
> I'd be interested in seeing just how expensive that O_DIRECT
> I/O is, and whether we need to get down and implement
> many-block get_block() interface.  Any numbers/profiles
> available?
> 

I will try and generate some numbers once I emerge from under a
mountain of email - I cannot use the Linus approach to email
backlogs ;-)

Steve



  parent reply	other threads:[~2002-07-26 20:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-18  8:43 O_DIRECT read and holes in 2.5.26 Stephen Lord
2002-07-22  2:26 ` Andrew Morton
2002-07-22  3:22   ` Anton Altaparmakov
2002-07-22  4:30     ` Andrew Morton
2002-07-26 20:22   ` Stephen Lord [this message]
2002-07-26 20:46     ` Andrew Morton

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=1027714959.1728.26.camel@localhost.localdomain \
    --to=lord@sgi.com \
    --cc=akpm@zip.com.au \
    --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