lkml.org 
[lkml]   [2009]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: regression in page writeback
On Tue, Sep 22, 2009 at 04:52:48PM +0800, Richard Kennedy wrote:
> On Tue, 2009-09-22 at 10:32 +0200, Peter Zijlstra wrote:
> > On Tue, 2009-09-22 at 16:24 +0800, Wu Fengguang wrote:
> > > On Tue, Sep 22, 2009 at 04:09:25PM +0800, Peter Zijlstra wrote:
> > > > On Tue, 2009-09-22 at 16:05 +0800, Wu Fengguang wrote:
> > > > >
> > > > > I'm not sure how this patch stopped the "overshooting" behavior.
> > > > > Maybe it managed to not start the background pdflush, or the started
> > > > > pdflush thread exited because it found writeback is in progress by
> > > > > someone else?
> > > > >
> > > > > - if (bdi_nr_reclaimable) {
> > > > > + if (bdi_nr_reclaimable > bdi_thresh) {
> > > >
> > > > The idea is that we shouldn't move more pages from dirty -> writeback
> > > > when there's not actually that much dirty left.
> > >
> > > IMHO this makes little sense given that pdflush will move all dirty
> > > pages anyway. pdflush should already be started to do background
> > > writeback before the process is throttled, and it is designed to sync
> > > all current dirty pages as quick as possible and as much as possible.
> >
> > Not so, pdflush (or now the bdi writer thread thingies) should not
> > deplete all dirty pages but should stop writing once they are below the
> > background limit.
> >
> > > > Now, I'm not sure about the > bdi_thresh part, I've suggested to maybe
> > > > use bdi_thresh/2 a few times, but it generally didn't seem to make much
> > > > of a difference.
> > >
> > > One possible difference is, the process may end up waiting longer time
> > > in order to sync write_chunk pages and quit the throttle. This could
> > > hurt the responsiveness of the throttled process.
> >
> > Well, that's all because this congestion_wait stuff is borken..
> >
>
> The problem occurred as pdflush stopped when the number of dirty pages
> reached the background threshold but balance_dirty_pages kept moving
> pages to writeback because the total of dirty + writeback was over the
> limit.

Ah yes it is possible. The pdflush started by balance_dirty_pages()
does stop at the background threshold (sorry for the confusion!),
and then balance_dirty_pages() continue to sync pages in _smaller_
chunk sizes, which should be suboptimal..

Thanks,
Fengguang


\
 
 \ /
  Last update: 2009-09-22 11:07    [W:0.159 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site