aboutsummaryrefslogtreecommitdiff
path: root/mm/msync.c
diff options
context:
space:
mode:
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>2009-12-15 16:47:11 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 07:20:07 -0800
commit57f9fd7d25ac9a0d7e3a4ced580e780ab4524e3b (patch)
treeff95e62e7326ba7e77903f7f767e9650c0d9b3dd /mm/msync.c
parenta3032a2c15c6967f9f0c0c28375b1a5c833a3112 (diff)
memcg: cleanup mem_cgroup_move_parent()
mem_cgroup_move_parent() calls try_charge first and cancel_charge on failure. IMHO, charge/uncharge(especially charge) is high cost operation, so we should avoid it as far as possible. This patch tries to delay try_charge in mem_cgroup_move_parent() by re-ordering checks it does. And this patch renames mem_cgroup_move_account() to __mem_cgroup_move_account(), changes the return value of __mem_cgroup_move_account() from int to void, and adds a new wrapper(mem_cgroup_move_account()), which checks whether a @pc is valid for moving account and calls __mem_cgroup_move_account(). This patch removes the last caller of trylock_page_cgroup(), so removes its definition too. Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/msync.c')
0 files changed, 0 insertions, 0 deletions