diff options
| author | Daisuke Nishimura <[email protected]> | 2010-03-10 15:22:17 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-03-12 15:52:36 -0800 |
| commit | 024914477e15ef8b17f271ec47f1bb8a589f0806 (patch) | |
| tree | 9a6a8b4224c94fcdd1b8c3127b301ee3537f8cc2 /tools/perf/scripts/python/syscall-counts.py | |
| parent | 8033b97c9b5ef063e3f4bf2efe1cd0a22093aaff (diff) | |
memcg: move charges of anonymous swap
This patch is another core part of this move-charge-at-task-migration
feature. It enables moving charges of anonymous swaps.
To move the charge of swap, we need to exchange swap_cgroup's record.
In current implementation, swap_cgroup's record is protected by:
- page lock: if the entry is on swap cache.
- swap_lock: if the entry is not on swap cache.
This works well in usual swap-in/out activity.
But this behavior make the feature of moving swap charge check many
conditions to exchange swap_cgroup's record safely.
So I changed modification of swap_cgroup's recored(swap_cgroup_record())
to use xchg, and define a new function to cmpxchg swap_cgroup's record.
This patch also enables moving charge of non pte_present but not uncharged
swap caches, which can be exist on swap-out path, by getting the target
pages via find_get_page() as do_mincore() does.
[[email protected]: fix ia64 build]
[[email protected]: fix typos]
Signed-off-by: Daisuke Nishimura <[email protected]>
Cc: Balbir Singh <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Signed-off-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions