linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Out of memory killer almost ready
@ 1998-05-21 18:07 Rik van Riel
  0 siblings, 0 replies; only message in thread
From: Rik van Riel @ 1998-05-21 18:07 UTC (permalink / raw)
  To: linux-mm

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> |
+-------------------------------------------+--------------------------+

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-05-21 19:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-21 18:07 Out of memory killer almost ready Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox