]> 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, 27 Jun 2013 23:51:18 +0000 (09:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:24 +0000 (16:37 +1000)
commitb79311f268e72973bf093f105447d9e7860d23fa
tree07f2f9d0478feffca7e9aaccf3cc9af83ce36b82
parenta1b21b0d8f7a79dd519f27f42b3117971674bc54
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