mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chad Talbott <ctalbott@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Michael Rubin <mrubin@google.com>
Subject: Re: Metadata in sys_sync_file_range and fadvise(DONTNEED)
Date: Wed, 5 Nov 2008 16:56:54 -0800	[thread overview]
Message-ID: <1786ab030811051656r7cc09fcakbf485c3b0663757@mail.gmail.com> (raw)
In-Reply-To: <20081101022128.3f8a535c.akpm@linux-foundation.org>

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 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.

Chad

  reply	other threads:[~2008-11-06  0:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 20:54 Chad Talbott
2008-11-01  9:21 ` Andrew Morton
2008-11-06  0:56   ` Chad Talbott [this message]
2008-11-06  1:07     ` Andrew Morton
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=1786ab030811051656r7cc09fcakbf485c3b0663757@mail.gmail.com \
    --to=ctalbott@google.com \
    --cc=akpm@linux-foundation.org \
    --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

all inboxes | Powered by JetHome®