Re: [PATCH] oom, memcg: handle sysctl oom_kill_allocating_task whilememcg oom happening

From: David Rientjes
Date: Tue Oct 16 2012 - 14:39:27 EST

On Tue, 16 Oct 2012, Michal Hocko wrote:

> The primary motivation for oom_kill_allocating_task AFAIU was to reduce
> search over huge tasklists and reduce task_lock holding times. I am not
> sure whether the original concern is still valid since 6b0c81b (mm,
> oom: reduce dependency on tasklist_lock) as the tasklist_lock usage has
> been reduced conciderably in favor of RCU read locks is taken but maybe
> even that can be too disruptive?
> David?

When the oom killer became serialized, the folks from SGI requested this
tunable to be able to avoid the expensive tasklist scan on their systems
and to be able to avoid killing threads that aren't allocating memory at
all in a steady state. It wasn't necessarily about tasklist_lock holding
time but rather the expensive iteration over such a large number of

> Moreover memcg oom killer doesn't iterate over tasklist (it uses
> cgroup_iter*) so this shouldn't cause the performance problem like
> for the global case.

Depends on how many threads are attached to a memcg.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at