[olpc-software] graceful handling of out-of-memory conditions

Jim Gettys jg at laptop.org
Fri Mar 17 14:47:39 UTC 2006


Alan,

Here's one idea:

If the window manager (which probably the best view of system activity),
were updating a list of processes in the kernel, as an ordered list of
processes it would like killed first in OOM conditions, I suspect we can
go a long way (probably the 90% solution).

So when the user changes the state of what is on top, the WM can then
warn some processes they might be shot in time for them to save state,
update the priority list in the kernel, and the kernel would know what
to kill first when OOM happens.

				Regards,
				 - Jim



On Fri, 2006-03-17 at 07:38 -0500, Alan Cox wrote:
> On Fri, Mar 17, 2006 at 11:35:45AM +0000, Mike Hearn wrote:
> > And as to the OOM killers behaviour - why does it not just kill whatever
> > is using the most memory at the time? I never understood that though
> > there must be a good reason.
> 
> Thats usually the X server, or the long running word processor with your vital
> document in it, not the new application that just started and therefore issued
> a lot of memory allocation requests...
> 
> People have spent something like ten years trying heuristics for the OOM
> killer on Linux and not found a sane general case that always shoots the
> right thing. OLPC is a more controlled environment so who knows maybe it can
> be done
> 
> --
> olpc-software mailing list
> olpc-software at redhat.com
> https://www.redhat.com/mailman/listinfo/olpc-software
-- 
Jim Gettys
One Laptop Per Child





More information about the olpc-software mailing list