Re: OOM in 2.2.14

From: jmcmullan@linuxcare.com
Date: Thu Jul 13 2000 - 16:38:15 EST


Michael Borrelli <mike@cc237069-b.brick1.nj.home.com> wrote:
> jmcmullan@linuxcare.com said this...
>> What not at 10% (or other specific limit) swap space
>>remaining - I belive that was my original suggestion,
>>and means that I CAN still run. And 100k of mlock()ed
>>memory would be plenty to a) renice all other processes
>>to 19 and b) send a little bit of X protocol to a currenlt running
>>X server or c) chvt() to an unused VT and use a text-based
>>What process do you want me to kill? dialog.

> As crazy as it may sound, I think it would be better to just take a guess
> (use an algorithm, and some user definable rules?) and kill it. In the
> rules file, or by default, send SIGQUIT first, and if the program doesn't
> leave, SIGKILL it after some predetermined wait.

        That is yet another alternative. The point is to put all of
the process killing logic in user-land - not to quibble about
possible implementations of such logic.

> I say this because 1) the server might be sitting alone in some server
> farm that the owner is 90 minutes away and 2) even if the user is there,
> what if the person is in a VT and it gets written to the wrong one or the
> prompt gets written in X? I'm there and willing to respond, but can't.

        Well, ok. Let's quibble. Assume, for sake of argument, that
the kernel puts out a kernel log message whenever VM is low
(as Rik pointed out, this is defined as:

        (total pages RAM + total pages swap) - (pages in ram+pages in swap) < some limit
)

        Now, also assume that we have a daemon that watches the
kernel logs for said error message. (plug in to syslog, whatever)

        That daemon could be whatever you want. A family of ``warm fuzzy''
daemons for the desktop systems, or a hard-nosed server system,
or a combination. The point I'm trying to make is that it would
be in USERLAND, where you don't have to recompile the kernel to
produce major changes in how the near-OOM scenario will be handled.

Desktop
-------
        *) Pop-up window
        *) Switch to inactive VT, text dialog
        *) Etc...

Server
------
        *) List of ``essential'' programs, not to kill unless completely necessary
        *) List of daemons to restart
        *) Some sort of expert system
        *) Etc...

-- 
Jason McMullan, Senior Linux Consultant, Linuxcare, Inc.
412.422.8077 tel, 412.656.3519 cell, 415.701.0792 fax
jmcmullan@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:18 EST