Re: [RFC] mlock/stack guard interaction fixup

Peter Zijlstra
2010-08-23T16:26:15Z

On Mon, 2010-08-23 at 16:42 +0100, ijackson@chiark.greenend.org.uk
wrote:
>
> mlocking the stack is entirely sensible and normal for a real-time
> program. Most such programs use mlockall but there is no particular
> reason why a program that has some more specific requirements should
> use mlock to lock only a part of the stack. (Perhaps it has only one
> real-time thread?)

RT apps should pre-allocate and mlock their stack in advance (and
pre-fault too for the paranoid).

mlockall is a very bad interface and should really not be used.