lkml.org 
[lkml]   [2000]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Kernel 2.2.14 OOM killer strikes.
Date
Mike Harris writes:
> >IIRC, programs that have a SIGDANGER handler registered (even if it does
> >nothing) are not killed (or at least killed last) - only programs that
> >leave ithe default signal handler (which is to ignore SIGDANGER) are
> >targets for being killed in an OOM situation. FYI, SIGDANGER=33 on AIX.
>
> What a FANTASTIC idea! Is there a way of adding such a feature
> to apps without source though?

I think someone suggested that you could have a user-space daemon which
has a SIGDANGER handler, and when it gets this signal it implements the
user's policy of killing programs before the kernel OOM handler kicks in.
It wouldn't exactly be the same thing, but it may be able to help in some
cases. I usually have many programs that could be killed and restarted
when the memory crunch was gone (e.g. faxrunq=1.7MB, xntpd=1.2MB,
mpg123=3MB, etc).

It would be _much_ better, however, to have important programs handle
SIGDANGER themselves, since they can free large internal buffers (e.g.
X and Netscape). If there is a danger that Netscape is causing the OOM
itself, it can free buffers itself first and/or simply exit if there
are no buffers to be freed.

Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert

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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.114 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site