summaryrefslogtreecommitdiffstats
path: root/fs/configfs
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2012-07-31 16:43:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 18:42:44 -0700
commit6b0c81b3be114a93f79bd4c5639ade5107d77c21 (patch)
tree4298dd463fcd7bbb629f37c309daf382c57017ce /fs/configfs
parent9cbb78bb314360a860a8b23723971cb6fcb54176 (diff)
downloadlinux-stable-6b0c81b3be114a93f79bd4c5639ade5107d77c21.tar.gz
linux-stable-6b0c81b3be114a93f79bd4c5639ade5107d77c21.tar.bz2
linux-stable-6b0c81b3be114a93f79bd4c5639ade5107d77c21.zip
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. [hughd@google.com: fix duplicate put_task_struct()] Signed-off-by: David Rientjes <rientjes@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: Oleg Nesterov <oleg@redhat.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/configfs')
0 files changed, 0 insertions, 0 deletions