From: "P.O. Gaillard" <pierre-olivier.gaillard@fr.thalesgroup.com>
To: Antonio Vargas <windenntw@gmail.com>
Cc: Helge Hafting <helge.hafting@aitel.hist.no>,
linux-kernel@vger.kernel.org
Subject: Re: Can on-demand loading of user-space executables be disabled ?
Date: Tue, 07 Feb 2006 17:45:55 +0100 [thread overview]
Message-ID: <43E8CEC3.2080502@fr.thalesgroup.com> (raw)
In-Reply-To: <69304d110601310228k2e92fd05qbb25949b0d6e9196@mail.gmail.com>
Thank you everybody. Somebody gave me another solution that applies when you can
recompile the executable and are willing to change the source code : call
mlockall to lock the process' memory space in memory.
It might be useful to quote the man page :
mlockall disables paging for all pages mapped into the address space of
the calling process. This includes the pages of the code, data and
stack segment, as well as shared libraries, user space kernel data,
shared memory and memory mapped files. All mapped pages are guaranteed
to be resident in RAM when the mlockall system call returns success-
fully and they are guaranteed to stay in RAM until the pages are
unlocked again by munlock or munlockall or until the process terminates
or starts another program with exec. Child processes do not inherit
page locks across a fork.
As you see, calling mlockall forces all the executable code to be loaded into
RAM and stay there. This also protects the program from getting swapped out. And
you can keep your swap for the other programs.
thanks again,
P.O. Gaillard
next prev parent reply other threads:[~2006-02-07 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 10:12 Can on-demand loading of user-space executables be disabled ? P.O. Gaillard
2006-01-31 8:43 ` Helge Hafting
2006-01-31 10:28 ` Antonio Vargas
2006-02-07 16:45 ` P.O. Gaillard [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-01-30 12:00 linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43E8CEC3.2080502@fr.thalesgroup.com \
--to=pierre-olivier.gaillard@fr.thalesgroup.com \
--cc=helge.hafting@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
--cc=windenntw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.