[lkml]   [2008]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Metadata in sys_sync_file_range and fadvise(DONTNEED)
On Wed, 5 Nov 2008 16:56:54 -0800
Chad Talbott <> wrote:

> On Sat, Nov 1, 2008 at 1:21 AM, Andrew Morton <> 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.


 \ /
  Last update: 2008-11-06 02:11    [W:0.053 / U:1.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site