From: Andi Kleen <ak@muc.de>
To: Mark_H_Johnson@Raytheon.com
Cc: linux-mm@kvack.org
Subject: Re: Query on memory management
Date: Thu, 6 Apr 2000 17:30:56 +0200 [thread overview]
Message-ID: <20000406173056.08616@colin.muc.de> (raw)
In-Reply-To: <OF65849FAF.07536636-ON862568B9.004B90AB@hso.link.com>; from Mark_H_Johnson@Raytheon.com on Thu, Apr 06, 2000 at 04:18:24PM +0200
On Thu, Apr 06, 2000 at 04:18:24PM +0200, Mark_H_Johnson@Raytheon.com wrote:
> Questions -
> (1) What hard limits are there on how much memory can be mlock'd? I see
> checks [in mm/mlock.c] related to num_physpages/2, but can't tell if that
> is a system wide limit or a limit per process.
system wide
You can probably change it if you know what you're doing.
>
> (2) I've seen traffic related to "out of memory" problems. How close are we
> to a permanent solution & do you need suggestions? For example, I can't
> seem to find any per-process limits to the "working set or virtual size"
> (could refer to either the number of physical or virtual pages a process
> can use). If that was implemented, some of the problems you have seen with
> rogue processes could be prevented.
There are per process limits, settable using ulimit
When you set suitable process limits and limit the number of processes you
should never run out of swap.
>
> (3) Re: out of memory. I also saw code in 2.2.14 [arch/i386/mm/fault.c]
> prevents the init task (pid==1) from getting killed. Why can't that
> solution be applied to all tasks & let kswapd (or something else) keep
> moving pages to the swap file (or memory mapped files) & kill tasks if and
> only if the backing store on disk is gone?
Tasks are supposed to be only killed when you ran out of swap, or it ran out of
free pages that it cannot swap anymore. Some services like networking
may run out of memory earlier becaue they cannot swap and rely on a free
GFP_ATOMIC pool of pages.
>
> (4) Is there a "hook" for user defined page replacement or page fault
> handling? I could not find one.
Just mprotect() the data in user space and set a signal handler for SIGSEGV
The fault address can be read from the sigcontext_struct passed to the
signal handler.
-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-04-06 15:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-06 14:16 Mark_H_Johnson
2000-04-06 15:30 ` Andi Kleen [this message]
2000-04-06 18:30 ` Jamie Lokier
2000-04-07 19:41 Mark_H_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=20000406173056.08616@colin.muc.de \
--to=ak@muc.de \
--cc=Mark_H_Johnson@Raytheon.com \
--cc=linux-mm@kvack.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