Re: [patch][rfc] expandable anonymous shared mappings

From: Hugh Dickins
Date: Sat Jun 19 2004 - 19:23:49 EST


On Sat, 19 Jun 2004, Stas Sergeev wrote:
> Hugh Dickins wrote:
> > shared anonymous only becomes interesting when you fork.

> I disagree with this. The way I am using it may look horrible,
> but yes, I do use it without the fork().

Then I think you have no reason to use MAP_SHARED: use MAP_PRIVATE
and you should get the behaviour you require, without kernel change.

Shared anonymous is peculiar: although mapping is anonymous (nothing
shared with unrelated mms), modifications are shared between parent
and children. It's half-way between anonymous and file-backed.

We agree that it might be nice to let the object used to support that
be extended if mremap extends the mapping. But it might instead just
be needless feature creep. Sorry, your case does not persuade me yet.

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/