In article <shshf68ig9h.fsf@charged.uio.no>,
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
>>>>>> " " == Petr Vandrovec <VANDROVE@vc.cvut.cz> writes:
>
> > You do not have to use NFS - look for my postings with
> > 'page->mapping == NULL' in archive. Your code uses shared mmap,
> > 'page->isn't
> > it? Probably shared by couple of processes.
>
>It's probably particularly nasty under NFS because of
>invalidate_inode_pages().
Btw, that "invalidate_inode_pages()" thing is just wrong - we can't just
remove pages that are mapped etc, because that would result in no end of
fun aliasing problems etc.
I don't see why invalidate_inode_pages() would be called for this
sequence, though, which is why I'd be more likely to blame the truncate
case, but I think you're right about invalidate_inode_pages() being a
problem none-the-less.
How about adding a test in invalidate_inode_pages() like
/* We cannot invalidate a locked page */
if (TryLockPage(page))
continue;
+ /* We cannot invalidate a page that is in use */
+ if (page_count(page) != 1) {
+ UnlockPage(page);
+ continue;
+ }
+
__lru_cache_del(page);
__remove_inode_page(page);
Because otherwise we might end up invalidating pages that might have
pending write-back etc (although I think the NFS logic tries to avoid
invalidating when there's pending activity).
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:16 EST