Re: [RFC] mlock/stack guard interaction fixup

From: Ian Campbell
Date: Sat Aug 21 2010 - 07:56:42 EST


On Fri, 2010-08-20 at 16:59 -0700, Linus Torvalds wrote:
> Ian (and others),
> here's a three-patch series that uses the doubly linked list to do
> your mlock() case hopefully correctly.

Thanks Linus.

> NOTE! It's untested. The first patch (which is the slightly scary one)
> is tested to some degree, the two other ones I checked that they
> compile, but that's it.

I applied on top of 2.6.35.3 and it fixes the simple test case I posted
yesterday as well as the original issue I was seeing with the Xen
toolstack on 2.6.32.20.

I don't know that they are particularly good tests for this change but I
also ran allmodconfig kernel build and ltp on 2.6.35.3+fixes without
issue. Are there any good mlock heavy workloads?

Out of interest, why is there no guard page for the VM_GROWSUP stack
case? Is it just that the memory layout on PA-RISC makes the stack grows
into the heap scenario impossible?

> I'm not going to apply them to my main tree unless they get testing
> and acks.

Tested-by: Ian Campbell <ijc@xxxxxxxxxxxxxx>

> And as mentioned, I've not done any of the changes that
> having a vm_prev pointer can allow in other places.
>
> Comments? Fixes? Braindamage?
>
> Linus

--
Ian Campbell

Providence, New Jersey, is one of the few cities where Velveeta cheese
appears on the gourmet shelf.

Attachment: signature.asc
Description: This is a digitally signed message part