Re: missing madvise functionality

Andi Kleen
2007-04-03T17:28:43Z

On Tue, Apr 03, 2007 at 10:20:02AM -0700, Ulrich Drepper wrote:
> Andi Kleen wrote:
> > Why do you need a lock for that? I don't see any problem with
> > two threads doing that in parallel. The kernel would
> > serialize it internally and one would fail, but that shouldn't
> > be a problem.
>
> There is no lock at all at userlevel. I'm talking about locks in the
> kernel.

mmap_sem? Your new operation wouldn't solve that neither.

There were some proposals to fix mmap_sem (it's a big issue
for futexes too) but they're are quite involved.

-Andi