mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Neil Brown <neilb@suse.de>
Cc: v9fs-developer@lists.sourceforge.net, trond.myklebust@fys.uio.no,
	Andrea Arcangeli <andrea@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 000 of 2] Invalidate_inode_pages2 changes.
Date: Mon, 28 Aug 2006 20:43:54 -0700	[thread overview]
Message-ID: <20060828204354.00acafcb.akpm@osdl.org> (raw)
In-Reply-To: <17651.43668.16773.512828@cse.unsw.edu.au>

On Tue, 29 Aug 2006 12:46:44 +1000
Neil Brown <neilb@suse.de> wrote:

> On Monday August 28, akpm@osdl.org wrote:
> > On Tue, 29 Aug 2006 11:30:15 +1000
> > NeilBrown <neilb@suse.de> wrote:
> > 
> > >  I'm picking up on a conversation that was started in late March
> > >  this year, and which didn't get anywhere much.
> > >  See
> > >    http://lkml.org/lkml/2006/3/31/93
> > >  and following.
> > 
> > Nick's "possible lock_page fix for Andrea's nopage vs invalidate race?"
> > patch (linux-mm) should fix this?
> > 
> > If filemap_nopage() does lock_page(), invalidate_inode_pages2_range() is solid?
> 
> UHmm.... yes.  In that case we can remove lots of stuff from
> invalidate_inode_pages2_range as we can be sure the page won't be
> dirty or in writeback so invalidate_complete_page will be certain to
> succeed. 

I'm not sure we can remove much from invalidate_inode_pages2_range(). 
After lock_page() returns the page can be under writeback, so the
wait_on_page_writeback() is appropriate.  After the page has been unmapped
from pagetables it could have been be redirtied.

Perhaps the while() loop is no longer necessary - nobody else will be
mapping this locked page into pagetables.

> So if that goes ahead, these become moot.  But until it does, these
> would be nice to have :-)

I guess we need to repair Nick's broken wing.

> Also, the patch at
>   http://marc.theaimsgroup.com/?l=linux-mm&m=115443228617576&w=2
> appears not to set 
>   +	.vm_flags	= VM_CAN_INVLD,
> for nfs_fs_vm_operations, but maybe they are a later addition to
> nfs...

I'm hoping all that stuff can go away.  Instead, change do_page_fault to
declare a new `struct page_fault_args' thing and pass that all the way up
and down the pagefault path.  Then, ->nopage implementations can simply set
page_fault_args.i_locked_the_page, to be examined at higher levels.

page_fault_args can also be used to tell do_no_page() to rerun the fault,
which would be needed if we want to stop holding down_read(mmap_sem) while
doing synchronous disk reads.

It'd be a fairly big-but-simple patch though.

> Thinks: should I subscribe to linux-mm... only about 100 messages per
> week.... maybe :-)

And no spam!

      reply	other threads:[~2006-08-29  3:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29  1:30 NeilBrown
2006-08-29  1:30 ` [PATCH 001 of 2] Invalidate_inode_pages2 shouldn't abort on first error NeilBrown
2006-08-29  1:30 ` [PATCH 002 of 2] Make data destruction in invalidate_inode_pages2 optional NeilBrown
2006-08-29  2:14 ` [PATCH 000 of 2] Invalidate_inode_pages2 changes Andrew Morton
2006-08-29  2:46   ` Neil Brown
2006-08-29  3:43     ` Andrew Morton [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=20060828204354.00acafcb.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=trond.myklebust@fys.uio.no \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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®