Re: what happened to page_mkwrite? - was: Re: page_mkwrite seemsbroken

From: Hugh Dickins
Date: Mon Oct 24 2005 - 11:02:58 EST


On Mon, 24 Oct 2005, Anton Altaparmakov wrote:
>
> I don't really mind either way. I am stuck with ntfs at the moment at
> the point where I am either going to use my own ->nopage handler to
> allocate on-disk clusters or have a ->page_mkwrite handler do it. The
> former is not nice as it means we allocate space even when only reading
> whilst the later is very nice as it only triggers when someone actually
> does an mmapped write.

A complication to beware of there (and I may be misunderstanding, but
the point is worth making). If you have already mmaped readonly zero
pages into some mms, you'll need to update those mms with the new
shared writable pages once they are allocated. That put me off using
page_mkwrite in tmpfs, but Carsten has solved the problem (though
not going so far as to use page_mkwrite) with his xip_file_nopage
in mm/filemap_xip.c - has to go down the vma_prio_tree like rmap.

(That code is a little different in -mm, partly because of my page
table locking changes, partly because of Nick's ZERO_PAGE changes.)

Hmm, strictly speaking, it should be substituting the new page
when VM_LOCKED: whether that's worth the effort of implementing....

Hugh
-
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/