Re: [PATCH] zap_pte_range should not mark non-uptodate pages dirty

From: Andrew Morton
Date: Thu Oct 21 2004 - 19:22:50 EST


Andrew Morton <akpm@xxxxxxxx> wrote:
>
> I don't get it. invalidate has the pageframe. All it need to do is to
> lock the page, examine mapcount and if it's non-zero, do the shootdown.

unmap_mapping_range() will do that - can call it one page at a time, or
batch up runs of pages. It's not fast, but presumably not frequent either.

The bigger problem is shooting down the buffer_heads. It's certainly the
case that mpage_readpage() will call block_read_full_page() which will then
bring the page uptodate without performing any I/O.

And invalidating the buffer_heads in invalidate_inode_pages2() is tricky -
we need to enter the filesystem and I'm not sure that either
->invalidatepage() or ->releasepage() are quite suitable. For a start,
they're best-effort and may fail. If we just go and mark the buffers not
uptodate we'll probably give ext3 a heart attack, so careful work would be
needed there.

Let's go back to why we needed all of this. Was it just for the NFS
something-changed-on-the-server code? If so, would it be sufficient to add
a new invalidate_inode_pages3() just for NFS, which clears the uptodate
bit? Or something along those lines?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/