]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, memcg: don't take task_lock in task_in_mem_cgroup
authorDavid Rientjes <rientjes@google.com>
Thu, 9 May 2013 23:57:16 +0000 (09:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 21 May 2013 04:17:41 +0000 (14:17 +1000)
commit97ddd2ef44bb6d04dcca9446347f472a10e03bdc
treee798332d6a45d5d721c148469cb7a843b1f9ab5b
parentce58e2735ea2de9597479f49e7997a40461e6138
mm, memcg: don't take task_lock in task_in_mem_cgroup

For processes that have detached their mm's, task_in_mem_cgroup()
unnecessarily takes task_lock() when rcu_read_lock() is all that is
necessary to call mem_cgroup_from_task().

While we're here, switch task_in_mem_cgroup() to return bool.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c