lkml.org 
[lkml]   [2008]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sync_file_range(SYNC_FILE_RANGE_WRITE) blocks?
On Mon, 16 Jun 2008 21:54:06 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> > The problem with lots of CFQ requests is simpler.
> >
> > If you look at balance_dirty_pages() you will see that it only
> > takes dirty and NFS unstable pages into account when checking
> > the dirty limit. The pages that are in flight (under IO) are
> > not counted at all.
>
> That would be totally busted. All that nr_writeback logic in there is very
> much supposed to handle under-writeback pages?

Mmm, you are right. It is counting the number of writeback
pages.

It just isn't waiting on them. After moving enough pages from
dirty state to writeback state, it breaks out of the loop and
allows memory dirtying to continue.

if (pages_written >= write_chunk)
break; /* We've done our duty */

I wonder if we should wait for some IO to complete, or at least
do a simple congestion_wait() if the number of writeback pages
is very large?

--
All rights reversed.


\
 
 \ /
  Last update: 2008-06-17 15:43    [W:0.037 / U:6.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site