public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Elladan <elladan@eskimo.com>
To: David Ford <david+cert@blue-labs.org>
Cc: Pavel Machek <pavel@ucw.cz>,
	"Grover, Andrew" <andrew.grover@intel.com>,
	"Martin J. Bligh" <mbligh@aracnet.com>,
	Nigel Cunningham <ncunningham@clear.net.nz>,
	Marc Giger <gigerstyle@gmx.ch>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: Fix SWSUSP & !SWAP
Date: Thu, 24 Apr 2003 00:01:26 -0700	[thread overview]
Message-ID: <20030424070126.GA30867@eskimo.com> (raw)
In-Reply-To: <3EA75EDD.20605@blue-labs.org>

You would have already OOM-killed them if you pre-reserved space, since
instead of using that space for swap like you should have, you reserved
it for swsusp.  This means that if swsusp had to OOM-kill in the swap
scenario, the system would already have run out of memory and had to
oom-kill in the reserved partition scenario.

It's just a matter of whether the system lets you start some tasks it 
can't suspend, in which case it has to shut them down during the suspend
stage, or it doesn't let you run those tasks, in which case you've
already run out of memory and had to terminate them.

It seems to me the real thing you want here is growable swap files in
the kernel.  This would let both cases succeed, provided there's enough
disk space sitting around in some filesystem which is marked for swap.

Of course, if you run out of disk, you'd still hit OOM in either case,
and disk full too.  And of course, if swap is allowed to grow without
bound, the system will thrash itself to death instead of OOM-ing
whenever a process goes wild.

-J

On Wed, Apr 23, 2003 at 11:49:49PM -0400, David Ford wrote:
> I honestly don't see OOMing as an acceptable practice.  If I wanted to 
> kill a bunch of stuff just to suspend, I would have simply shut the 
> system down.  That isn't my intent or desire.  I want to suspend the 
> system just as it is without OOMing a bunch of programs.
> 
> David
> 
> Pavel Machek wrote:
> 
> >Hi!
> >
> > 
> >
> >>>From: Martin J. Bligh [mailto:mbligh@aracnet.com] 
> >>>Can't you just create a pre-reserved separate swsusp area on 
> >>>disk the size 
> >>>of RAM (maybe a partition rather than a file to make things 
> >>>easier), and 
> >>>then you know you're safe (basically what Marc was 
> >>>suggesting, except pre-allocated)? Or does that make me the 
> >>>prince of all evil? ;-)
> >>>
> >>>However much swap space you allocate, it can always all be 
> >>>used, so that seems futile ...
> >>>     
> >>>
> >>This is what Other OSes do, and I believe this is the correct path.
> >>Using swap for swsusp is a clever hack but not a 100% solution.
> >>   
> >>
> >
> >Well, for normal use its clearly inferior -- suspend partition is unused
> >when it could be used for speeding system up by swapping out unused
> >stuff.
> >
> >OtherOS approach is better because it can guarantee suspend-to-disk
> >for critical situations like overheat or battery-critical.
> >
> >But we can get best of both worlds if we OOM-kill during critical
> >suspend. [If suspend partition was not used for swapping, machine
> >would *already* OOM-killed someone, so we are only improving stuff].
> >
> >						Pavel  
> >
> > 
> >
> 
> -
> 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/

  parent reply	other threads:[~2003-04-24  6:50 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 23:47 Fix SWSUSP & !SWAP Grover, Andrew
2003-04-24  0:03 ` Pavel Machek
2003-04-23 23:57   ` Martin J. Bligh
2003-04-24  0:25     ` Pavel Machek
2003-04-24  0:37       ` CaT
2003-04-24  0:49       ` Martin J. Bligh
2003-04-24  9:16         ` Pavel Machek
2003-04-24  0:02   ` Nigel Cunningham
2003-04-24  0:23     ` Pavel Machek
2003-04-24  0:45     ` Martin J. Bligh
2003-04-24  3:17       ` Nigel Cunningham
2003-04-24  4:37         ` Martin J. Bligh
2003-04-24  7:49           ` Marc Giger
2003-04-24  9:27           ` Pavel Machek
2003-04-24  3:49   ` David Ford
2003-04-24  6:54     ` Jörn Engel
2003-04-24  7:01     ` Elladan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-23 13:51 Pavel Machek
2003-04-23 14:32 ` Geert Uytterhoeven
2003-04-23 14:47   ` Pavel Machek
2003-04-23 15:56     ` gigerstyle
2003-04-23 19:41       ` Nigel Cunningham
2003-04-23 20:36         ` Marc Giger
2003-04-23 22:25           ` Nigel Cunningham
2003-04-23 23:28             ` Martin J. Bligh
2003-04-23 23:58               ` Pavel Machek
2003-04-23 23:55                 ` Martin J. Bligh
2003-04-24  0:07                 ` Andrew Morton
2003-04-24  0:17                   ` CaT
2003-04-24  0:16                     ` Nigel Cunningham
2003-04-24  0:26                       ` Randy.Dunlap
2003-04-24  0:31                         ` CaT
2003-04-24  0:38                         ` Andrew Morton
2003-04-24  0:54                           ` CaT
2003-04-24  1:06                             ` Andrew Morton
2003-04-24  8:48                           ` John Bradford
2003-04-24  0:37                       ` Andrew Morton
2003-04-24  9:12                         ` Pavel Machek
2003-04-24  9:25                           ` Andrew Morton
2003-04-24  9:35                             ` Pavel Machek
2003-04-24  9:46                               ` Andrew Morton
2003-04-24 11:13                                 ` Nigel Cunningham
2003-04-24 11:36                                   ` Andrew Morton
2003-04-24 14:26                                     ` Pavel Machek
2003-04-24 16:37                                       ` Andreas Dilger
2003-04-24 20:48                                         ` Pavel Machek
2003-04-24 21:46                                           ` Andreas Dilger
2003-04-25  1:09                                             ` Nigel Cunningham
2003-04-25 12:59                                               ` Pavel Machek
2003-04-25 16:20                                                 ` Andreas Dilger
2003-04-25 18:28                                                   ` Nigel Cunningham
2003-04-25 19:32                                                     ` Jamie Lokier
2003-04-25 19:58                                                     ` Andreas Dilger
2003-04-27 18:59                                                   ` Pavel Machek
2003-04-24 11:36                                   ` Geert Uytterhoeven
2003-04-25  1:22                                     ` H. Peter Anvin
2003-04-25  1:19                                       ` Nigel Cunningham
2003-04-25  1:31                                       ` Hua Zhong
2003-04-25 19:41                                         ` H. Peter Anvin
2003-04-25  4:27                                       ` Andreas Dilger
2003-04-25  4:33                                         ` H. Peter Anvin
2003-04-24  0:25                   ` Pavel Machek
2003-04-24  9:01                     ` Andrew Morton
2003-04-24  9:14                       ` Pavel Machek
2003-04-24  9:05                     ` Jamie Lokier
2003-04-24  9:34                       ` Pavel Machek
2003-04-24 15:22                     ` Carl-Daniel Hailfinger
2003-04-24  8:00             ` Marc Giger

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=20030424070126.GA30867@eskimo.com \
    --to=elladan@eskimo.com \
    --cc=andrew.grover@intel.com \
    --cc=david+cert@blue-labs.org \
    --cc=geert@linux-m68k.org \
    --cc=gigerstyle@gmx.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=ncunningham@clear.net.nz \
    --cc=pavel@ucw.cz \
    /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