[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On Tue, 2006-03-28 at 09:13 -0500, Alan Cox wrote:
> On Tue, Mar 28, 2006 at 08:59:20AM -0500, David Zeuthen wrote:
> >  - All child processes inherit this; HAL, NM, the X server, the panel,
> >    the WM etc.
> 
> You want to set these not to disable but to "last resort" - ie almost disable
> otherwise you'll deadlock if one of them leaks.

Well, if one of them leaks we would have identified this in testing yes?
I really think we don't want to kill them; we want a rock solid base of
services we can always assume are there; sure if HAL or NM suddenly
needs to allocated some memory one of the "applications" (e.g. Firefox,
Abiword) will have to pay for it by getting shot by the OOM killer...
Yes?

> 
> >  - Our desktop shell sets /proc/pic/oom_adj to something != OOM_DISABLE
> >    for child processes launched (e.g. Firefox, Abiword etc.) 
> 
> Yep. For firefox I suspect "shoot me first"
> 
> > What do you think?
> 
> I think its likely in the OOM enabled case that you will take 10 minutes
> of unusuable box and frozen pointer before you get an OOM event, especially
> if you are dealing in lots of small allocations and in the no overcommit case
> it doesn't occur anyway. You can't mix the two otherwise one app can overcommit
> another anyway.

But we don't use swap? Why would it take 10 minutes; wouldn't that be
something that needs to be fixed in the kernel? I'm confused...

> Would it be useful if there were two levels of "no room" (actually there 
> already are but its hardcoded for root). In other words the system rules would
> be something like
> 
> 	100% swap + 60% ram + oom_adj based value
> 
> so instead of hitting OOM we would refuse allocations which is what we need to
> do to keep the box running sanely not bog down but we would refuse allocations
> to applications before things like the WM and panel.

I think we would want to never refuse allocations to the "desktop shell"
components (e.g. WM, panel, HAL etc.) as long as we have
"applications" (e.g. Firefox, Abiword) to shoot. Doesn't this make
sense?

    David



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]