[lkml]   [2004]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Suspend 2 merge:L 12/51: Disable OOM killer when suspending.

On Fri, 2004-11-26 at 05:12, Pavel Machek wrote:
> Hi!
> > When preparing the image, suspend eats all the memory in sight, both to
> > reduce the image size and to improve the reliability of our stats (We've
> > worked hard to make it work reliably under heavy load - 100+). Of course
> > this can result in the OOM killer being triggered, so this simple test
> > stops that happening.
> andrew's shrink_all_memory should enable you to free memory without
> hacking OOM killer, no?

I do use shrink_all_memory, but I also then allocate those pages that
were freed. We added that when seeking to get Suspend to work well and
reliably under heavy load. IIRC, the issue was that pages that were
freed were immediately getting allocated by other programs. Having said
this, it is a while since I looked at the code for preparing the image.
I can take a look and confirm my thinking.

> If shrink_all_memory is broken... fix it.


> > + if (test_suspend_state(SUSPEND_FREEZER_ON))
> > + return;
> > +
> Hmm, yes, something like this migh be usefull for BUG_ONs etc...
> For consistency, right name is probably in_suspend(void).

There is a difference; there is sections of time where we're in_suspend
(test_suspend_state(SUSPEND_RUNNING)) but the freezer isn't on (initial
set up and cleanup). As far as the OOM killer goes, it probably doesn't
matter which is used, but I thought it important to point out that
freezer being on !== in_suspend(). (Freezer could also be on for S3?..
'spose you don't care of OOM killer runs then, though). Would you like
to see in_freezer()?


Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly. -- Romans 5:6

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:08    [W:0.232 / U:8.332 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site