linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <H.H.vanRiel@phys.uu.nl>
To: linux-mm <linux-mm@kvack.org>
Subject: Out of memory killer almost ready
Date: Thu, 21 May 1998 20:07:39 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.LNX.3.91.980521200258.18589A-100000@mirkwood.dummy.home> (raw)

Hi,

I've now finished most of the Out of memory
killer, except for one thing.

I don't know what condition to test for for
when to start the procedure. We could wait
until kswapd truly fails, but wouldn't that
be waiting _too_ long. OTOH, if we don't,
we can kill a process when it isn't needed.

in kswapd:
	alive = 0;
	while (tries--) {
		cruft;
		if (try_to_free_page())
			alive = 1;	
	}
	if (!alive)
		out_of_memory_killer();

This has the disadvantage of:
- taking things too far
- kicking in when kswapd has just been very
  unlucky

OTOH, testing for free swap space won't help a bit
when we are killed by mlock(), pagetables and other
nonswappable things...

Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page          | Scouting       webmaster |
|        - kswapd ask-him & complain-to guy | Vries    cubscout leader |
|     http://www.phys.uu.nl/~riel/          | <H.H.vanRiel@phys.uu.nl> |
+-------------------------------------------+--------------------------+

                 reply	other threads:[~1998-05-21 19:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.3.91.980521200258.18589A-100000@mirkwood.dummy.home \
    --to=h.h.vanriel@phys.uu.nl \
    --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