Messages in this thread | | | Date | Tue, 17 Jun 2008 09:38:25 -0400 | From | Rik van Riel <> | Subject | Re: 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.
| |