On Fri, 07.05.10 10:49, Colin Walters ([email protected]) wrote:

> 
> On Fri, May 7, 2010 at 10:38 AM, Lennart Poettering <[email protected]> wrote:
> >
> > oom_adj is a way to make the OOM killer smarter. So far only very few
> > apps set that, but we certainly could change that.
> 
> I think asking application authors to patch their apps to use that
> interface is a lot less nice than say asking them to add this key, and
> then if we decided that using the extant oom_adj kernel interface was
> the way to go, the desktop UI could set oom_adj when launching the app
> (after fork, before exec if it's inherited, otherwise take the small
> race condition and set it after invocation).

That in fact is very similar to how systemd handles this: in our
.service files you have the OOMAdjust setting which is used to initialize
the oom_adj field on fork().

If this is added to the .desktop files too, then I'd however suggest to
follow the oom_adj semantics closely, and make the field a nice-like
value instead of a boolean. And it might be an idea to prefix this with
X- or so, because then it becomes Linux-specific. Example:

X-OOMAdjust=10

> > So tell me, why exactly do you want this to be duplicated in userspace?
> 
> We can work out the exact details of how all the components interact
> after the fact.

Well, before changing a standard one should have a good idea of the use
case and a possible implementation...

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to