From: Glauber Costa Date: Tue, 29 May 2012 22:07:10 +0000 (-0700) Subject: memcg: always free struct memcg through schedule_work() X-Git-Tag: v3.5-rc1~49^2~67 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3afe36b1fe7d1e3f66752bb9548a763942f3a104;p=pandora-kernel.git memcg: always free struct memcg through schedule_work() Right now we free struct memcg with kfree right after a rcu grace period, but defer it if we need to use vfree() to get rid of that memory area. We do that by need, because we need vfree to be called in a process context. This patch unifies this behavior, by ensuring that even kfree will happen in a separate thread. The goal is to have a stable place to call the upcoming jump label destruction function outside the realm of the complicated and quite far-reaching cgroup lock (that can't be held when holding either the cpu_hotplug.lock or jump_label_mutex) [akpm@linux-foundation.org: tweak comment] Signed-off-by: Glauber Costa Cc: Tejun Heo Cc: Li Zefan Acked-by: KAMEZAWA Hiroyuki Cc: Johannes Weiner Acked-by: Michal Hocko Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed