From: Andrew Morton <akpm@osdl.org>
To: Zach Brown <zach.brown@oracle.com>
Cc: Jeff Moyer <jmoyer@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] call truncate_inode_pages in the DIO fallback to buffered I/O path
Date: Wed, 4 Oct 2006 12:16:45 -0700 [thread overview]
Message-ID: <20061004121645.fd2765e4.akpm@osdl.org> (raw)
In-Reply-To: <45240034.2040704@oracle.com>
On Wed, 04 Oct 2006 11:40:52 -0700
Zach Brown <zach.brown@oracle.com> wrote:
>
> > We have lots of nice new tools in-kernel which permit applications to
> > manipulate and to invalidate pagecache. Please, start using them rather
> > than pushing bits of oracle into the core vfs ;)
>
> And apps that were written before they were available? :) We're OK with
> their behaviour changing under newer kernels because they now have a
> previous source of memory pressure that they didn't have before?
>
> It seems a bit much to suggest that retaining the previous behaviour of
> avoiding memory pressure by using the O_DIRECT API is somehow "pushing
> bits of oracle into the core vfs" :).
>
> Maybe that aspect of the API was unintentional, though. That would be a
> shame. I suspect Oracle isn't alone in relying on it.
Why do so many patches degenerate into these little question-and-answer
sessions? It's like pulling teeth. Please completely describe the
problem.
What "newer kernels"? The kernel has had the fall-back-to-buffered
behaviour for *ages*.
What's so bad about having a bit of pagecache floating about during what
is, I expect, a fairly rare operation?
What are the user-visible effects of this pagecache?
Please don't just sling a patch at us and leave us to guess what it's for.
> > Please, no truncate_inode_pages. For this application, the far-safer
> > invalidate_inode_pages() would suffice.
>
> So now apps always have to pay the cost of looking up pages to
> invalidate on the off chance that they wrote to a sparse region, based
> on the current implementation detail that sparse regions fall back to
> buffered?
"current"? It was current about two years ago!
What I've thus far been able to decrypt from this exchange has been that
you think that the Linux direct-IO API should, as a side-effect, guarantee
that a direct-io write (and read?) of a file area should not leave that
part of the file in pagecache.
Well we _could_ define the API in that fashion. It'd need to be carefully
documented somewhere. But it's a fairly bizarre requirement, especially as
userspace already has quite rich ways of manipulating pagecache.
To do this right without modifying userspace we're going to need to sync
these pages to disk within the write() syscall and then invalidate them.
That might screw somebody else up, but I think it could be justified on the
grounds that direct-io is a synchronous operation, so we should still be
synchronous if we went the buffered route.
next prev parent reply other threads:[~2006-10-04 19:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 17:04 [patch] call truncate_inode_pages in the DIO fallback to buffered I/O path Jeff Moyer
2006-10-04 17:25 ` Andrew Morton
2006-10-04 17:51 ` Zach Brown
2006-10-04 17:53 ` Jeff Moyer
2006-10-04 18:16 ` Andrew Morton
2006-10-04 18:40 ` Zach Brown
2006-10-04 19:16 ` Andrew Morton [this message]
2006-10-04 20:53 ` Jeff Moyer
2006-10-04 21:22 ` Jeff Moyer
2006-10-04 23:55 ` Andrew Morton
2006-10-05 19:31 ` Jeff Moyer
2006-10-06 20:11 ` Andrew Morton
2006-10-11 16:48 ` jmoyer
2006-10-11 18:37 ` Andrew Morton
2006-10-12 22:01 ` Jeff Moyer
2006-10-12 22:37 ` 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=20061004121645.fd2765e4.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zach.brown@oracle.com \
/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