[Sugar-devel] Killing activities when memory gets short

Tomeu Vizoso tomeu at sugarlabs.org
Sun Aug 8 11:58:48 EDT 2010


On Sun, Aug 8, 2010 at 17:42, Martin Langhoff <martin.langhoff at gmail.com> wrote:
> On Sun, Aug 8, 2010 at 9:33 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
>>> Can't we just _close it nicely_?
>>
>> When you are about to get into OOM?
>
> Early on so we avoid OOM for most cases. Right now our OOM use cases
> have nothing to do with misbehaved activities.
>
> Once you're in "about to get into OOM", sugar-shell is unlikely to get
> many cycles (and python is a bad lang to try handling this). If you
> can seed the OOM scores of the process early on, you have a chance
> that OOM will kill a reasonably "correct" one. (Not sure what the
> state of play is with seeding the OOM scores from userland).

I tried to make clear before that by all means I think we should give
the user and activities the chance to do what is best early on.

>> point we should have given the activities and/or the user the option
>> to avoid this situation.
>
> I think it's the only thing we can reasonably do. And [if possible],
> seed OOM scores.
>
> When things get tight, only the kernel has a standing chance to run code.

Well, the shell would kill activities before we get that tight. But I
agree that if if we can use OOM scores to have the kernel kill the
less bad thing, that sounds better.

Regards,

Tomeu

> cheers,
>
>
> m
> --
>  martin.langhoff at gmail.com
>  martin at laptop.org -- School Server Architect
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff
>


More information about the Sugar-devel mailing list