linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Kristian Peters <kristian.peters@korseby.net>,
	linux-kernel@vger.kernel.org,
	"Robert L. Harris" <Robert.L.Harris@rdlg.net>
Subject: Re: oom killer in 2.4.23
Date: Tue, 9 Dec 2003 09:52:13 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.53.0312090942470.8772@chaos> (raw)
In-Reply-To: <20031209142151.GB12532@dualathlon.random>

On Tue, 9 Dec 2003, Andrea Arcangeli wrote:

> On Sat, Dec 06, 2003 at 10:31:43AM +0100, Kristian Peters wrote:
> > Andrea Arcangeli <andrea@suse.de> schrieb:
> > > what you're complaining is the 'selection of the task to be killed'.
> > > That's not solvable. the kernel can't read your brain period. Only if
> > > the kernel could read the brain of the adminstrator then you would be
> > > happy, there is no way the kernel can know which is the task you really
> > > want to have killed first.
> >
> > I agree. On a server the most likely application to be killed would be the service with the most pages in memory. And those services tend to be the important ones.
> >
> > However, for a simple desktop-linux that statistical approach seems to
> > be wrong. Your vm has even killed /sbin/getty sometimes, so that I
> > can't login via a simple console.
>

Not true! Killing a getty or agetty or any other login
program cannot prevent a login! Init will just start another
one if there is enough RAM to fork()/exec(). If there isn't,
it has nothing to do with killing the getties and everything
to do with being completely out of RAM. In that case, you
need to enable quotas and not let fork-bombs or other deliberate
crashers be executed by root.

Script started on Tue Dec  9 09:42:06 2003
# ps
  PID TTY STAT  TIME COMMAND
  478   3 S    0:00 /sbin/agetty 38400 tty3
  479   4 S    0:00 /sbin/agetty 38400 tty4
  480   5 S    0:00 /sbin/agetty 38400 tty5
  481   6 S    0:00 /sbin/agetty 38400 tty6
 4404   1 S    0:00 -bash
 6102   2 S    0:00 -bash
 8772   1 S    0:00 pine
 8778   2 S    0:00 script
 8779   2 S    0:00 script
 8780  p0 S    0:00 bash -i
 8784  p0 R    0:00 ps
# killall -9 agetty
# ps
  PID TTY STAT  TIME COMMAND
 4404   1 S    0:00 -bash
 6102   2 S    0:00 -bash
 8772   1 S    0:00 pine
 8778   2 S    0:00 script
 8779   2 S    0:00 script
 8780  p0 S    0:00 bash -i
 8787   3 S    0:00 /sbin/agetty 38400 tty3
 8788   4 S    0:00 /sbin/agetty 38400 tty4
 8789   5 S    0:00 /sbin/agetty 38400 tty5
 8790   6 S    0:00 /sbin/agetty 38400 tty6
 8791  p0 R    0:00 ps
# exit
exit

Script done on Tue Dec  9 09:42:41 2003

The above shows 4 getty's being killed. They are immediately
restarted by init. These getties become new shell-tasks in
the following order: exec /sbin/login, exec /bin/bash. There are
no additional forks so, in principle, you have nearly all the
resources needed for a shell as soon as a getty is started.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.



  reply	other threads:[~2003-12-09 14:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Z6Iv-7O2-29@gated-at.bofh.it>
     [not found] ` <Z8Ag-3BK-3@gated-at.bofh.it>
     [not found]   ` <Zbyn-23P-29@gated-at.bofh.it>
2003-12-05 13:05     ` oom killer in 2.4.23 Kristian Peters
2003-12-05 13:56       ` Robert L. Harris
2003-12-05 19:58       ` Andrea Arcangeli
2003-12-06  9:31         ` Kristian Peters
2003-12-09 14:21           ` Andrea Arcangeli
2003-12-09 14:52             ` Richard B. Johnson [this message]
2003-12-09 17:06               ` Andrea Arcangeli
2003-12-09 18:50                 ` Kristian Peters
2003-12-05 22:38       ` Mike Fedyk
2003-12-05 22:56         ` Andrea Arcangeli
2003-12-04 16:12 Peter Bergmann
2003-12-04 17:02 ` Maciej Zenczykowski
2003-12-04 17:20   ` Guillermo Menguez Alvarez
2003-12-04 23:52     ` Andrea Arcangeli
2003-12-04 18:33   ` Peter Bergmann
2003-12-04 18:42     ` Jens Axboe
2003-12-04 20:38       ` Peter Bergmann
2003-12-04 20:28         ` Szakacsits Szabolcs
2003-12-04 23:58         ` Andrea Arcangeli

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.4.53.0312090942470.8772@chaos \
    --to=root@chaos.analogic.com \
    --cc=Robert.L.Harris@rdlg.net \
    --cc=andrea@suse.de \
    --cc=kristian.peters@korseby.net \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).