diff options
| author | Daisuke Nishimura <[email protected]> | 2009-12-15 16:47:11 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-12-16 07:20:07 -0800 |
| commit | 57f9fd7d25ac9a0d7e3a4ced580e780ab4524e3b (patch) | |
| tree | ff95e62e7326ba7e77903f7f767e9650c0d9b3dd /include/linux/debugobjects.h | |
| parent | a3032a2c15c6967f9f0c0c28375b1a5c833a3112 (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 <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Balbir Singh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions