mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: sim@netnation.com, linux-kernel@vger.kernel.org
Subject: Re: Writing over NFS causes lots of paging
Date: 12 Nov 2001 04:36:53 +0100	[thread overview]
Message-ID: <shs1yj4wtgq.fsf@charged.uio.no> (raw)
In-Reply-To: <200111111829.fABIT9v14680@penguin.transmeta.com>
In-Reply-To: <200111111829.fABIT9v14680@penguin.transmeta.com>

>>>>> " " == Linus Torvalds <torvalds@transmeta.com> writes:

     > The VM layer has one explicit special case: it knows about the
     > magic in "page->buffers", and can handle writeback for
     > block-oriented devices sanely. But any non-buffer-oriented
     > filesystem is "invisible" to the VM layer, and has to use other
     > tricks to make the VM ignore its pages.

<snip>

     > Quite frankly, I don't rightly know what the real fix
     > is. Making "page->buffers" be a generic thing (a "void *")
     > along with making the buffer flushing logic be behind a address
     > space operation is probably the right thing in the long run.

That only takes care of writebacks. Don't forget that reading &
readahead can also eat memory if somebody forgets to call lock_page()
(a common problem on 'hard,intr' mounts).

You'll notice that in the NFS updates I sent you the other day, there
is a new function 'nfs_try_to_free_pages()' that provides a rather
generic way of freeing up NFS memory resources. Its sole purpose today
is to ensure that we keep an upper limit of 256 requests per mount.

My (still somewhat vague) plan is to expand that interface some time
during 2.5.x to allow the VM to control and limit the memory usage of
the NFS client - flushing out read and write requests if necessary.
IMHO, the filesystem can often be more efficient at clearing out pages
if we leave the choice of strategy up to it, rather than having the VM
micro-manage exactly which page is to be thrown out first.
For instance, under NFSv3 there is usually a huge advantage to sending
off a COMMIT over any other call, since it can potentially free up a
whole truckload of pages.

Cheers,
   Trond

      reply	other threads:[~2001-11-12  3:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-11 10:48 Simon Kirby
2001-11-11 18:29 ` Linus Torvalds
2001-11-12  3:36   ` Trond Myklebust [this message]

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=shs1yj4wtgq.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sim@netnation.com \
    --cc=torvalds@transmeta.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®