mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil>
To: FWeber@ndsuk.com, linux-kernel@vger.kernel.org
Subject: Re: Process-wise swap-on/off option
Date: Mon, 15 Jul 2002 13:18:05 -0500 (CDT)	[thread overview]
Message-ID: <200207151818.NAA10895@tomcat.admin.navo.hpc.mil> (raw)

"Weber, Frank" <FWeber@ndsuk.com>:
> 
> Hello:
> 
> Is it possible to arrange that a Linux application 
> (or one of its threads) has the ability to
> 
> 	"... lock (a certain) stack and data segment ... 
> 	into memory so that it can't be swapped out"?
> 
> [This has been formulated as a requirement by one of 
> our analysts.]
> 
> I have been told that this is unlikely (except by 
> disabling swapout altogether (for all processes). 
> 
> Any hints as to where to look for a solution (i.e., 
> pointers to documentation or manuals where the ifs 
> and hows are explained) would be greatly appreciated.
> 
> Many thanks in advance,
> F.P.Weber
> 
> 
> P.S. Due to security on our mail-server i am unable to
> enrol or subscribe to the news-group. Please cc me into
> any replies. Thanks again.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

See manpage on "mlockall" system call. Also refer to the "mlock" system call.

I have a tendency to be suspicious of requirements to lock pages
in memory. If this is a dedicated, real-time task, then it is likely
to be "not really real-time" and does not really need to be locking
pages. I would suggest trying the application out without locking pages
first, since the fix for such paging is better handled by adding more
memory to the system instead. Locking pages means that you may get
failures due to the inability to handle short term memory pressure.

Another (cheap) way to prevent paging is to just not mount a swap file.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

             reply	other threads:[~2002-07-15 18:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-15 18:18 Jesse Pollard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-15 16:01 Weber, Frank
2002-07-15 16:13 ` Rik van Riel
2002-07-15 16:16 ` Hugh Dickins
2002-07-15 16:42 ` Richard B. Johnson

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=200207151818.NAA10895@tomcat.admin.navo.hpc.mil \
    --to=pollard@tomcat.admin.navo.hpc.mil \
    --cc=FWeber@ndsuk.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®