ASU - out of memory?

Steven Kurylo sk at infinitepigeons.org
Fri Aug 22 01:02:20 CEST 2008


>> I'm not sure this is true on Freerunner.  None of the embedded systems
>> I've used have had swap.
> Because they where really embedded.
> Openmoko is more or less a mobile desktop.

Its embedded because of the limited resources available to it.

> Slowing down is clearly better than instant crashing.
> How ever any early warning system for low memory looks, it can not
> guarantee it will be able to fix thing before mem runs out.
> This is also true with swap, but much much less probable.
>
> Can you answer al call? I don't know - probably.
> Besides, i can live with bad service while my phone is recovering from
> a nearby crash.
> And just imagine. Your phone is in a fragile low memory state, and a
> call comes in and the phone app needs to be launched.
> Everything great? Sure not.  No matter how.

The dialer app would be exempt from the killer.

There are two issues here.  First, you want a smart oom killer
regardless if you have swap or not.  Core services would never been
killed.

Secondly, is it better to have very slow swap to prolong oom killer
being launched?  You could do extensive testing to change my mind, but
I think swap is going to provide a horrible user experience.  Its
going to take forever to swap 50mb off the SD card.  I'd much rather
always have top speed and less applications running.

But really we can't even be sure there will be an SD card, so that
makes most of this moot.  Now a patch could be made to scan for swap
space on start up, so people like you who want it can insert an SD
card with swap defined.

As for an new oom killer, I think it should expose an file in sysfs.
We can then watch that file, if its 0 everything is ok.  If its 4,
we're running low on memory, less than 10%?,  and our daemon
monitoring this could send the user a popup telling them to close
something.  When there is less than 1%, the file changes to 9.  The
userspace daemon then kills a non critical service.  Something along
those lines, we need a kernel guy to let us know whats possible.

Or perhaps the sysfs file should be 0 for normal or 1 for start
killing.  Then leave it up to userspace daemon to figure out if we're
at send a pop up to the user stage.




More information about the community mailing list