]> 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, 23 May 2013 00:37:08 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 27 May 2013 06:08:59 +0000 (16:08 +1000)
commit04571ac9c081610991d2d03f7758cb534cda23a4
tree7ee4972795c8a02f5cea2be1615c7bfd439e92d1
parent69717661d409d1feda1c370228e52b2e91717c93
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