Re: /proc/<n>/maps getting _VERY_ long

H. Peter Anvin (hpa@zytor.com)
5 Aug 2001 23:30:44 -0700


Followup to: <9kl6aa$87l$1@penguin.transmeta.com>
By author: torvalds@transmeta.com (Linus Torvalds)
In newsgroup: linux.dev.kernel
>
> In article <9kkr7r$mov$1@cesium.transmeta.com>,
> H. Peter Anvin <hpa@zytor.com> wrote:
> >
> >Do you count applications which selectively mprotect()'s memory (to
> >trap SIGSEGV and maintain coherency with on-disk data structures) as
> >"broken applications"?
> >
> >Such applications *can* use large amounts of mprotect()'s.
>
> Note that such applications tend to not get any advantage from merging -
> it does in fact only slow things down (because then the next mprotect
> just has to split the thing again).
>

Unless you're doing a sequential access in the data space, for example
while accessing a large object. If a single large object (usually
called a BLOB) covers N pages, and is accessed in its entirety, you
will typically have N pagefaults, each of which bring/unprotect the
page and then mprotect() it accordingly. Those could all be merged
back into a single vma.

Now, I don't know how frequently this actually happens, but I do think
it is at least a possibility.

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>
-
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/