All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Andrew Morton <akpm@osdl.org>,
	neilb@suse.de, okir@suse.de, nfs@lists.sourceforge.net
Subject: Re: Problems with mmap consistency
Date: Sat, 25 Feb 2006 18:27:37 +0100	[thread overview]
Message-ID: <20060225172737.GB5410@g5.random> (raw)
In-Reply-To: <1140879301.3615.137.camel@lade.trondhjem.org>

On Sat, Feb 25, 2006 at 09:55:01AM -0500, Trond Myklebust wrote:
> If we don't clear PG_dirty in writepage(), then the VM gets all huffy.
> However, we do not want to start actual writeback until we've got enough
> pages to make it worth our while. For that reason, we track the dirty
> pages in the NFS layer, and start writeout when writepages() is done.

Isn't ->writepages API enough to coalesce writes together? Why do you
assume you will get more data to write by waiting more time? pagecache
layer already waits long enough before calling ->writepages.

I'm unsure if you really gain anything. If you weren't using
->writepages already then your local hack would look more worthwhile to
me.

> How does this differ from a page that has buffers but is "clean"?

That those clean buffers can be discarded without data loss?

Andrew stated the invariant: "a clean page with dirty buffers is
illegal.".

Now with this last flush on try_to_release_page perhaps you can get away
with it, but your problem was going way beyond the VM race.

My fix fixed the VM race only (note that the same race would happen on
ext2 too if you called randomly invalidate_inode_pages2 on any inode,
which btw, surprise is what the new ioctl FIPUNCHMEM does... So let's
say my fix is for FIPUNCHMEM and nfs on VM side.

Your patch fixes an entirely different matter, that is, it tries to
close the holes that you opened by breaking the invariant that a page
can be dirty still but with PG_dirty not set.

So again, those two patches are orthogonal. In the current state of
things both looks to me, though I would like to understand if you really
get a benefit from the local nfs hack around the pagecache invariants.

Thanks.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2006-02-25 17:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 10:57 Problems with mmap consistency Olaf Kirch
2006-02-17 15:15 ` Trond Myklebust
2006-02-24  4:01   ` Andrea Arcangeli
2006-02-24  6:15     ` Neil Brown
2006-02-24 16:08       ` Andrea Arcangeli
2006-02-24 23:39         ` Andrew Morton
2006-02-25  0:33           ` Andrea Arcangeli
2006-02-25  0:59             ` Trond Myklebust
2006-02-25  1:17               ` Andrew Morton
2006-02-25  4:59                 ` Andrea Arcangeli
2006-02-25 14:55                   ` Trond Myklebust
2006-02-25 17:27                     ` Andrea Arcangeli [this message]
2006-02-25 18:42                       ` Trond Myklebust
2006-02-27  0:26                         ` Neil Brown
2006-02-28  1:04                         ` Andrea Arcangeli
2006-02-26 22:33         ` Neil Brown
2006-02-24  7:12     ` Olaf Kirch

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=20060225172737.GB5410@g5.random \
    --to=andrea@suse.de \
    --cc=akpm@osdl.org \
    --cc=neilb@suse.de \
    --cc=nfs@lists.sourceforge.net \
    --cc=okir@suse.de \
    --cc=trond.myklebust@fys.uio.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.