Re: invalidate_inode_pages in 2.5.32/3

Andrew Morton
2002-09-05T20:13:40Z

Trond Myklebust wrote:
>
> >>>>> " " == Andrew Morton <akpm@zip.com.au> writes:
>
> > You may have more success using the stronger
> > invalidate_inode_pages2().
>
> Shouldn't make any difference. Chuck is seeing this on readdir() pages
> which, of course, don't suffer from problems of dirtiness etc on NFS.

Well the VM will take a ref on the page during reclaim even if it
is clean.

With what sort of frequency does this happen? If it's easily reproducible
then dunno. If it's once-an-hour then it may be page reclaim, conceivably.
The PageLRU debug test in there will tell us.

> I've noticed that the code that used to clear page->flags when we
> added a page to the page_cache has disappeared. Is it possible that
> pages are being re-added with screwy values for page->flags?

It's possible - those flags were getting set all over the place,
and for add_to_swap(), the nonatomic rmw was an outright bug.

The intent now is to set the initial page state in prep_new_page()
and to then modify it atomically from there on in ways which make
sense, rather than "because that's what the code used to do".
Something may have got screwed up in there. Suggest you print
out page->flags from in there and we can take a look.

It's a bit worrisome if NFS is dependent upon successful pagecache
takedown in invalidate_inode_pages.