Re: [RFC] vmtruncate releases pages of MAP_PRIVATE vma

Andrew Morton (akpm@digeo.com)
Tue, 21 Jan 2003 11:51:01 -0800


Alex Tomas wrote:
>
> Good day!
>
> I've just encountered that vmtruncate() releases all pages of
> selected VMA. It does even if VMA is MAP_PRIVATE. Is this right
> behaviour?

If the size of the mapped file changes after the call to mmap()
as a result of some other operation on the mapped file, the
effect of references to portions of the mapped region that
correspond to added or removed portions of the file is
unspecified.

> I think vmtruncate() should preserve that pages.

That would make sense. But we'd have to go and create zillions
of copies of pages inside truncate, and given that the behaviour
is unspecified, it is questionable whether anyone should be
relying on the behaviour anyway..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/