]> 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>
Wed, 19 Jun 2013 00:05:49 +0000 (10:05 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:12:54 +0000 (17:12 +1000)
commit4bc7e93fbbcd9aaf6f923f2f67f9450c4fdb2151
tree569dbcb3ec9bde9560b7875dacf984b5b628cf71
parentafc77f1c50d72d63d0dff3850dbd82863824292f
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