linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC][PATCH] Avoid vmtruncate/mmap-page-fault race
@ 2003-05-23 18:42 Paul E. McKenney
  2003-05-29 15:14 ` Paul E. McKenney
  0 siblings, 1 reply; 8+ messages in thread
From: Paul E. McKenney @ 2003-05-23 18:42 UTC (permalink / raw)
  To: hugh; +Cc: phillips, akpm, hch, linux-mm, linux-kernel

On Fri, May 23, 2003 at 06:47:31PM +0100, Hugh Dickins wrote:
> On Fri, 23 May 2003, Daniel Phillips wrote:
> > On Friday 23 May 2003 18:21, Hugh Dickins wrote:
> > > Sorry, I miss the point of this patch entirely.  At the moment it just
> > > looks like an unattractive rearrangement - the code churn akpm advised
> > > against - with no bearing on that vmtruncate race.  Please correct me.
> > 
> > This is all about supporting cross-host mmap (nice trick, huh?).  Yes, 
> > somebody should post a detailed rfc on that subject.
> 
> Ah, thanks - translated into terms that I can understand, so that
> some ->nopage() not yet in the tree could do something after the
> install_new_page() returns.  Hmm.  Can we be sure it's appropriate
> for install_new_page to drop mm->page_table_lock before it returns?

Exactly -- allows a ->nopage() to drop some lock to avoid races
between pagefault and either vmtruncate() or invalidate_mmap_range().
This race (from the cross-host mmap viewpoint) is described in:

    http://marc.theaimsgroup.com/?l=linux-kernel&m=105286345316249&w=2

install_new_page() has to drop mm->page_table_lock() for the same
reason that the previous do_no_page() did.  In addition, dropping
the lock permits a ->nopage() to invoke things like zap_page_range()
which acquire mm->page_table_lock().

						Thanx, Paul

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-05-30 16:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-23 18:42 [RFC][PATCH] Avoid vmtruncate/mmap-page-fault race Paul E. McKenney
2003-05-29 15:14 ` Paul E. McKenney
2003-05-29 15:18   ` [RFC][PATCH] Remove LINUX_2_2 Paul E. McKenney
2003-05-29 16:33   ` [RFC][PATCH] Avoid vmtruncate/mmap-page-fault race Hugh Dickins
2003-05-29 17:15     ` Daniel Phillips
2003-05-29 17:39       ` Daniel Phillips
2003-05-29 20:24         ` Paul E. McKenney
2003-05-30  2:38     ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).