From: Andrew Morton <akpm@linux-foundation.org>
To: Chad Talbott <ctalbott@google.com>
Cc: linux-kernel@vger.kernel.org, mrubin@google.com
Subject: Re: Metadata in sys_sync_file_range and fadvise(DONTNEED)
Date: Wed, 5 Nov 2008 17:07:48 -0800 [thread overview]
Message-ID: <20081105170748.0e7dac89.akpm@linux-foundation.org> (raw)
In-Reply-To: <1786ab030811051656r7cc09fcakbf485c3b0663757@mail.gmail.com>
On Wed, 5 Nov 2008 16:56:54 -0800
Chad Talbott <ctalbott@google.com> wrote:
> On Sat, Nov 1, 2008 at 1:21 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
> > And fadvise(FADV_DONTNEED) is just that: "I won't be using that data
> > again". Implementing specific writeback behaviour underneath that hint
> > is unobvious and a bit weird. It's a bit of a fluke that it does
> > writeout at all!
> >
> > We have much more flexibility with sync_file_range(), and it is more
> > explicit.
>
> So in the new world, an application should call sync_file_range
> (solving my problem by including metadata) to initiate writeout, and
> then call posix_fadvise(DONTNEED) to drop the pages from page cache?
> I think this would work for me.
That would work.
Although Nick is threatening to make
sync_file_range(SYNC_FILE_RANGE_WRITE) all slow by using WB_SYNC_ALL,
probably unnecessarily, ho hum.
> > That being said, I don't understand why the IO scheduling problems
> > which you're seeing are occurring. There is code in fs/mpage.c
> > specifically to handle this case (search for "write_boundary_block").
> > It will spot that 4k indirect block in the middle of two 4MB data
> > blocks and will schedule it for writeout at the right time.
> >
> > So why isn't that working?
>
> Very good question, I'll look into why it's not helping here.
>
Thanks.
next prev parent reply other threads:[~2008-11-06 1:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-31 20:54 Metadata in sys_sync_file_range and fadvise(DONTNEED) Chad Talbott
2008-11-01 9:21 ` Andrew Morton
2008-11-06 0:56 ` Chad Talbott
2008-11-06 1:07 ` Andrew Morton [this message]
2008-11-06 1:27 ` Chad Talbott
2008-11-02 22:45 ` Dave Chinner
2008-11-06 1:19 ` Chad Talbott
2008-11-06 4:20 ` Dave Chinner
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=20081105170748.0e7dac89.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ctalbott@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mrubin@google.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