In article <[EMAIL PROTECTED]>,
Trond Myklebust <[EMAIL PROTECTED]> wrote:
>>>>>> " " == Petr Vandrovec <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/