From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
Peter Zijlstra <peterz@infradead.org>,
Martin Knoblauch <spamtrap@knobisoft.de>,
linux-kernel@vger.kernel.org
Subject: Re: Likley stupid question on "throttle_vm_writeout"
Date: Tue, 10 Nov 2009 15:55:20 +0900 (JST) [thread overview]
Message-ID: <20091110154929.3618.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20091110020858.GA5749@localhost>
> On Mon, Nov 09, 2009 at 04:26:33PM +0100, Peter Zijlstra wrote:
> > On Mon, 2009-11-09 at 07:15 -0800, Martin Knoblauch wrote:
> > > Hi, (please CC me on replies)
> > >
> > > I have a likely stupid question on the function "throttle_vm_writeout". Looking at the code I find:
> > >
> > > if (global_page_state(NR_UNSTABLE_NFS) +
> > > global_page_state(NR_WRITEBACK) <= dirty_thresh)
> > > break;
> > > congestion_wait(WRITE, HZ/10);
> > >
> > > Shouldn't the NR_FILE_DIRTY pages be considered as well?
> >
> > Ha, you just trod onto a piece of ugly I'd totally forgotten about ;-)
> >
> > The intent of throttle_vm_writeout() is to limit the total pages in
> > writeout and to wait for them to go-away.
>
> Like this:
>
> vmscan fast => large NR_WRITEBACK => throttle vmscan based on it
>
> > Everybody hates the function, nobody managed to actually come up with
> > anything better.
>
> btw, here is another reason to limit NR_WRITEBACK: I saw many
> throttle_vm_writeout() waits if there is no wait queue to limit
> NR_WRITEBACK (eg. NFS). In that case the (steadily) big NR_WRITEBACK
> is _not_ caused by fast vmscan..
btw, this explanation point out why we should remove other bare congestion_wait()
in reclaim path.
At least, I observed the congestion_wait() in do_try_to_free_pages() decrease
reclaim performance very much.
next prev parent reply other threads:[~2009-11-10 6:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 15:15 Martin Knoblauch
2009-11-09 15:26 ` Peter Zijlstra
2009-11-10 2:08 ` Wu Fengguang
2009-11-10 6:55 ` KOSAKI Motohiro [this message]
2009-11-10 12:01 ` Martin Knoblauch
2009-11-10 13:08 ` Wu Fengguang
2009-11-10 16:11 ` Martin Knoblauch
2009-11-11 0:45 ` Wu Fengguang
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=20091110154929.3618.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=spamtrap@knobisoft.de \
/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®