Re: invalidate_inode_pages in 2.5.32/3

From: Andrew Morton (akpm@digeo.com)
Date: Sat Sep 07 2002 - 18:09:12 EST


Rik van Riel wrote:
>
> On Sat, 7 Sep 2002, Daniel Phillips wrote:
> > On Friday 06 September 2002 00:19, Andrew Morton wrote:
> > > I'm not sure what semantics we really want for this. If we were to
> > > "invalidate" a mapped page then it would become anonymous, which
> > > makes some sense.
> >
> > There's no need to leave the page mapped, you can easily walk the rmap list
> > and remove the references.
>
> A pagefaulting task can have claimed a reference to the page
> and only be waiting on the lock we're currently holding.

Yup. In which case it comes away with an anonymous page.

I'm very unkeen about using the inaccurate invalidate_inode_pages
for anything which matters, really. And the consistency of pagecache
data matters.

NFS should be using something stronger. And that's basically
vmtruncate() without the i_size manipulation. Hold i_sem,
vmtruncate_list() for assured pagetable takedown, proper page
locking to take the pages out of pagecache, etc.

Sure, we could replace the page_count() heuristic with a
page->pte.direct heuristic. Which would work just as well. Or
better. Or worse. Who knows?

Guys, can we sort out the NFS locking so that it is possible to
take the correct locks to get the 100% behaviour?
-
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/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:33 EST