diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2010-08-11 03:02:58 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-11 17:59:18 +0200 |
commit | 2bd9bb206b338888b226e70139a25a67d10007f0 (patch) | |
tree | ac556b1bfa52f06fe2998371d10edec38d5cf2a9 /mm/mmu_context.c | |
parent | memcg: clean up try_charge main loop (diff) | |
download | linux-2bd9bb206b338888b226e70139a25a67d10007f0.tar.xz linux-2bd9bb206b338888b226e70139a25a67d10007f0.zip |
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 <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmu_context.c')
0 files changed, 0 insertions, 0 deletions