Re: user defined OOM policies

From: Michal Hocko
Date: Thu Nov 21 2013 - 12:13:15 EST


On Wed 20-11-13 19:38:56, David Rientjes wrote:
> On Wed, 20 Nov 2013, Michal Hocko wrote:
>
> > OK, I was a bit vague it seems. I meant to give zonelist, gfp_mask,
> > allocation order and nodemask parameters to the modules. So they have a
> > better picture of what is the OOM context.
> > What everything ould modules need to do an effective work is a matter
> > for discussion.
> >
>
> It's an interesting idea but unfortunately a non-starter for us because
> our users don't have root,

I wouldn't see this as a problem. You can still have a module which
exports the notification interface you need. Including timeout
fallback. That would be trivial to implement and maybe more appropriate
to very specific environments. Moreover the global OOM handling wouldn't
be memcg bound.

> we create their memcg tree and then chown it to the user. They can
> freely register for oom notifications but cannot load their own kernel
> modules for their own specific policy.

yes I see but that requires just a notification interface. It doesn't
have to be memcg specific, right?
--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/