Re: /proc/<n>/maps growing...

David S. Miller (davem@redhat.com)
Mon, 6 Aug 2001 06:06:14 -0700 (PDT)


Andrea Arcangeli writes:
> On Tue, Aug 07, 2001 at 12:45:10AM +1200, Chris Wedgwood wrote:
> > for anonymous maps, when it can extend the previos map, mmap will do
> > so --- it happens to occur quite often in practice
>
> ah, what an horrible hack, so we just walk the tree _two_ times and we
> don't even take advantage of that (over)work as we should!

I wouldn't classify it as a horrible hack... but.

It isn't doing the "other work" because:

1) The locking is really horrible. You have to drop/reget the VMA
and mm locks if you want to link/unlink other vmas to do the
merging.

2) For mmap() itself these other cases not being handled now happen so
rarely.

So instead of an abortion like merge_segments() which tried to be
everything to everybody, we have 4 lines of code.

The issue is mprotect() anyways. I bet we can add something which,
while not as simple as the mmap() code, is not overly complex yet will
make this glibc mprotect() case happy.

On the topic of mmap limits, it is really a job for something like
Andrey Savochkin's bean counter patches.

Later,
David S. Miller
davem@redhat.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/