mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Andrew Morton <akpm@osdl.org>
Cc: sgoel01@yahoo.com, linux-kernel@vger.kernel.org
Subject: Re: 2.6.6-rc{1,2} bad VM/NFS interaction in case of dirty page writeback
Date: Tue, 27 Apr 2004 11:36:47 -0400	[thread overview]
Message-ID: <1083080207.2616.31.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20040426225834.7035d2c1.akpm@osdl.org>

On Tue, 2004-04-27 at 01:58, Andrew Morton wrote:

> > Currently, we use this on virtually anything that trigggers writepage()
> > with the wbc->for_reclaim flag set.
> 
> Why?  Sorry, I still do not understand the effect which you're trying to
> achieve?  I thought it was an efficiency thing: send more traffic via
> writepages().  But your other comments seem to indicate that this is not
> the primary reason.

That is the primary reason. Under NFS, writing is a 2 stage process:

 - Stage 1: "schedule" the page for writing. Basically this entails
creating an nfs_page struct for each dirty page and putting this on the
NFS private list of dirty pages.
 - Stage 2: "flush" the NFS private list of dirty pages. This involves
coalescing contiguous nfs_page structs into chunks of size "wsize", and
actually putting them on the wire in the form of RPC requests.

writepage() only deals with one page at a time, so it will work fine for
doing stage 1.
If you also try force it to do stage 2, then you will end up with chunks
of size <= PAGE_CACHE_SIZE because there will only be 1 page on the NFS
private list of dirty pages. In practice this again means that you
usually have to send 8 times as many RPC requests to the server in order
to process the same amount of data.

This is why I'd like to try to leave stage 2) to writepages().

Now normally, that is not a problem, since the actual calls to
writepage() are in fact made by means of a call to generic_writepages()
from within nfs_writepages(), so I can do all the correct things once
I'm done with generic_writepages().

However shrink_cache() (where the MM calls writepage() directly) needs
to be treated specially, since that is not wrapped by a writepages()
call. In that case, we return WRITEPAGE_ACTIVATE and wait for pdflush to
call writepages().

Cheers,
  Trond

  parent reply	other threads:[~2004-04-27 15:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-27  1:12 Shantanu Goel
2004-04-27  2:15 ` Andrew Morton
2004-04-27  3:11   ` Trond Myklebust
2004-04-27  3:59     ` Andrew Morton
2004-04-27  5:23       ` Trond Myklebust
2004-04-27  5:58         ` Andrew Morton
2004-04-27 11:44           ` Shantanu Goel
2004-04-27 15:36           ` Trond Myklebust [this message]
2004-04-28  0:47             ` Shantanu Goel
2004-04-28  1:02               ` Andrew Morton
2004-04-28  1:28                 ` Trond Myklebust
2004-04-28  1:38                   ` Andrew Morton
2004-04-28  5:29             ` Christoph Hellwig
2004-04-28 16:17               ` Trond Myklebust
2004-04-28 16:38                 ` Christoph Hellwig
2004-04-28 19:07                   ` Andrew Morton
2004-04-29  1:48                     ` Nathan Scott
2004-04-29  8:27                       ` Christoph Hellwig
2004-04-27  6:10       ` Nick Piggin

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=1083080207.2616.31.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgoel01@yahoo.com \
    /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®