aboutsummaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorDavid Rientjes <[email protected]>2012-07-31 16:43:45 -0700
committerLinus Torvalds <[email protected]>2012-07-31 18:42:44 -0700
commit6b0c81b3be114a93f79bd4c5639ade5107d77c21 (patch)
tree4298dd463fcd7bbb629f37c309daf382c57017ce /include/linux/timerqueue.h
parent9cbb78bb314360a860a8b23723971cb6fcb54176 (diff)
mm, oom: reduce dependency on tasklist_lock
Since exiting tasks require write_lock_irq(&tasklist_lock) several times, try to reduce the amount of time the readside is held for oom kills. This makes the interface with the memcg oom handler more consistent since it now never needs to take tasklist_lock unnecessarily. The only time the oom killer now takes tasklist_lock is when iterating the children of the selected task, everything else is protected by rcu_read_lock(). This requires that a reference to the selected process, p, is grabbed before calling oom_kill_process(). It may release it and grab a reference on another one of p's threads if !p->mm, but it also guarantees that it will release the reference before returning. [[email protected]: fix duplicate put_task_struct()] Signed-off-by: David Rientjes <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Reviewed-by: Michal Hocko <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions