lkml.org 
[lkml]   [2013]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: user defined OOM policies
On Thu, 28 Nov 2013, Michal Hocko wrote:

> > We already have hooks in the kernel oom killer, things like
> > /proc/sys/vm/oom_kill_allocating_task
>
> How would you implement oom_kill_allocating_task in userspace? You do
> not have any context on who is currently allocating or would you rely on
> reading /proc/*/stack to grep for allocation functions?
>

Not the exact behavior, sorry. I implemented oom_kill_allocating_task at
the request for SGI that simply wanted to avoid the lengthy tasklist scan,
they don't actually care what is killed as long as something is killed.
The actual allocating task is difficult to predict, especially in system
oom conditions, and their motivation was to make it as quickly as
possible. Userspace could certainly kill a random eligible process :)


\
 
 \ /
  Last update: 2013-12-03 05:21    [W:0.442 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site