From: KAMEZAWA Hiroyuki Date: Wed, 11 Aug 2010 01:02:58 +0000 (-0700) Subject: memcg: clean up waiting move acct X-Git-Tag: v2.6.36-rc1~150 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bd9bb206b338888b226e70139a25a67d10007f0;p=pandora-kernel.git memcg: clean up waiting move acct Now, for checking a memcg is under task-account-moving, we do css_tryget() against mc.to and mc.from. But this is just complicating things. This patch makes the check easier. This patch adds a spinlock to move_charge_struct and guard modification of mc.to and mc.from. By this, we don't have to think about complicated races arount this not-critical path. [balbir@linux.vnet.ibm.com: don't crash on a null memcg being passed] Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Balbir Singh Cc: Daisuke Nishimura Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed