From: Andrew Morton <akpm@osdl.org>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Michal Sabala <lkml@saahbs.net>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.18 mmap hangs unrelated apps
Date: Tue, 19 Dec 2006 16:03:15 -0800 [thread overview]
Message-ID: <20061219160315.ea83ca38.akpm@osdl.org> (raw)
In-Reply-To: <1166570378.5760.52.camel@lade.trondhjem.org>
On Tue, 19 Dec 2006 18:19:38 -0500
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
> NFS: Fix race in nfs_release_page()
>
> invalidate_inode_pages2() may set the dirty bit on a page owing to the call
> to unmap_mapping_range() after the page was locked. In order to fix this,
> NFS has hooked the releasepage() method. This, however leads to deadlocks
> in other parts of the VM.
hmm, subtle.
> Fix is to add a new callback: flushpage(), which will write out a dirty
> page that is under the page lock.
>
I guess this might permit us to clean up some of the nasties in
invalidate_inode_pages2() - if the page comes dirty again, write it again.
But the requirement that the page remain locked makes it hard. Need to
think about it some more.
Are you sure this is the cause of the NFS problem?
> .prepare_write = nfs_prepare_write,
> .commit_write = nfs_commit_write,
> .invalidatepage = nfs_invalidate_page,
> - .releasepage = nfs_release_page,
A NULL ->releasepage means that try_to_release_page() will call
try_to_free_buffers() if PagePrivate(). I suspect you'll need a stub to
prevent this.
(We were supposed to stop doing that about four years ago - change it so
that all a_ops must implement ->releasepage, but nobody got around to it).
next prev parent reply other threads:[~2006-12-20 0:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 2:30 2.6.18 mmap hangs unrelated apps Michal Sabala
2006-12-15 16:24 ` Trond Myklebust
2006-12-15 17:50 ` Michal Sabala
2006-12-15 19:44 ` Trond Myklebust
2006-12-15 21:06 ` Michal Sabala
2006-12-15 21:12 ` Arjan van de Ven
2006-12-15 21:43 ` Michal Sabala
2006-12-15 21:44 ` Trond Myklebust
2006-12-15 22:05 ` Michal Sabala
2006-12-19 22:26 ` Andrew Morton
2006-12-19 23:19 ` Trond Myklebust
2006-12-20 0:03 ` Andrew Morton [this message]
2006-12-20 0:17 ` Trond Myklebust
2006-12-20 0:22 ` Andrew Morton
2006-12-20 1:21 ` Trond Myklebust
2007-01-08 14:48 ` [PATCH] NFS: Fix race in nfs_release_page() Peter Zijlstra
2006-12-20 14:51 ` 2.6.18 mmap hangs unrelated apps Michal Sabala
2006-12-15 20:42 ` Andrew Morton
2006-12-15 21:35 ` Michal Sabala
2006-12-15 21:41 ` Andrew Morton
2006-12-16 12:59 ` Christian Kuhn
2006-12-16 18:45 ` Christian Kuhn
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=20061219160315.ea83ca38.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@saahbs.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox