On Mon, 2005-12-19 at 17:47 +0000, Alan Cox wrote: > On Llu, 2005-12-19 at 18:27 +0100, Jan-Benedict Glaw wrote: > > > > that we did this because inheriting MCL_FUTURE is standards-incorrect. > > > > > > Oh! So how can I make programs unswappable with kernel 2.6.x then? > > > > That would mean that you cannot just exec() another program that will > > also be mlockall()ed. The new program has to do that on its own... > > mlockall MCL_FUTURE applies to this image only and the 2.6 behaviour is > correct if less useful in some ways. It would be possible to add an > inheriting MCL_ flag that was Linux specific but then how do you control > the depth of inheritance ? If that isn't an issue it looks the easiest. > > Another possibility would be pmlockall(pid, flag), but that looks even > more nasty if it races an exec. How about clearing MCL_FUTURE on fork but allow exec to inherit it? That way a parent process could fork, mlockall in the child and exec a memlocked child. A regular fork,exec by a memlocked parent would not create a memlocked child. Seems less messy than a new flag, while keeping the benefits. -- Zan Lynx <[email protected]>
Attachment:
signature.asc
Description: This is a digitally signed message part
- Follow-Ups:
- Re: [Bug] mlockall() not working properly in 2.6.x
- From: Alan Cox <[email protected]>
- Re: [Bug] mlockall() not working properly in 2.6.x
- References:
- [Bug] mlockall() not working properly in 2.6.x
- From: Marc-Jano Knopp <[email protected]>
- Re: [Bug] mlockall() not working properly in 2.6.x
- From: Andrew Morton <[email protected]>
- Re: [Bug] mlockall() not working properly in 2.6.x
- From: Marc-Jano Knopp <[email protected]>
- Re: [Bug] mlockall() not working properly in 2.6.x
- From: Jan-Benedict Glaw <[email protected]>
- Re: [Bug] mlockall() not working properly in 2.6.x
- From: Alan Cox <[email protected]>
- [Bug] mlockall() not working properly in 2.6.x
- Prev by Date: Re: Light-weight dynamically extended stacks
- Next by Date: Re: [NFS] Re: lockd: couldn't create RPC handle for (host)
- Previous by thread: Re: [Bug] mlockall() not working properly in 2.6.x
- Next by thread: Re: [Bug] mlockall() not working properly in 2.6.x
- Index(es):