Re: [RFC][PATCH] Avoid vmtruncate/mmap-page-fault race

Paul E. McKenney (paulmck@us.ibm.com)
Thu, 29 May 2003 13:24:39 -0700


On Thu, May 29, 2003 at 07:39:47PM +0200, Daniel Phillips wrote:
> On Thursday 29 May 2003 19:15, Daniel Phillips wrote:
> > On Thursday 29 May 2003 18:33, you wrote:
> > > Me? I much preferred your original, much sparer, nopagedone patch
> > > (labelled "uglyh as hell" by hch).
> >
> > "me too".
>
> Oh wait, I mispoke... there is another formulation of the patch that hasn't
> yet been posted for review. Instead of having the nopagedone hook, it turns
> the entire do_no_page into a hook, per hch's suggestion, but leaves in the
> ->nopage hook, which makes the patch small and obviously right. I need to
> post that version for comparison, please bear with me.
>
> IMHO, it's nicer than the ->nopagedone form.

I put together something like this, but the problem with it is that
do_anonymous_page() needs the mm->page_table_lock held, but the
->nopage functions want this lock not to be held. One could require
that all the lock be held on entry to all ->nopage functions, but
this would require almost all ->nopage functions to drop the lock
immediately upon entry. This seemed error-prone to me, but could
certainly be done...

Thoughts? Me, I don't care as long as there is some reasonable
way for distributed filesystems to safely resolve the race between
page faults and invalidation requests from other nodes. ;-)

Thanx, Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/