RFC memcg: migrate charge at task move
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest8 patches 31 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | memcg: introduce mem_cgroup_cancel_charge()mm/ | +14 | 1 reply | |
| 1/8 | cgroup: introduce cancel_attach()Documentation/ include/ kernel/ | +42 | 2 replies | |
| 2/8 | memcg: cleanup mem_cgroup_move_parent()include/ mm/ | +31 | 1 reply | |
| 2/8 | memcg: introduce mem_cgroup_cancel_charge()mm/ | +18 | 0 replies | |
| 3/8 | cgroup: introduce cancel_attach()include/ kernel/ | +31 | 0 replies | |
| 3/8 | memcg: cleanup mem_cgroup_move_parent()include/ mm/ | +45 | 2 replies | |
| 4/8 | memcg: add interface to migrate chargemm/ | +65 | 2 replies | |
| 4/8 | memcg: add interface to migrate chargemm/ | +61 | 2 replies | |
| 5/8 | memcg: migrate charge of anonmm/ | +195 | 4 replies | |
| 5/8 | memcg: migrate charge of mapped pagemm/ | +268 | 4 replies | |
| 6/8 | memcg: migrate charge of shmemmm/ | +8 | 1 reply | |
| 6/8 | memcg: avoid oom during charge migrationmm/ | +19 | 6 replies | |
| 7/8 | memcg: migrate charge of swapinclude/ mm/ mm/ | +158 | 3 replies | |
| 7/8 | memcg: migrate charge of swapinclude/ mm/ mm/ | +128 | 0 replies | |
| 8/8 | memcg: avoid oom during charge migrationmm/ | +18 | 0 replies | |
| 8/8 | memcg: migrate charge of shmem swapinclude/ mm/ mm/ | +58 | 2 replies |
Reviews trailers per patch
4 of 16 patches have a Reviewed-by or Acked-by.
| Patch | KAMEZAWA Hiroyuki |
|---|---|
| 1/8 | A-b |
| 1/8 | A-b |
| 2/8 | A-b |
| 2/8 | A-b |
| 3/8 | |
| 3/8 | |
| 4/8 | |
| 4/8 | |
| 5/8 | |
| 5/8 | |
| 6/8 | |
| 6/8 | |
| 7/8 | |
| 7/8 | |
| 8/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC][EXPERIMENTAL][PATCH 0/8] memcg: migrate charge at task move
Hi.
These are patches for migrating memcg's charge at task move.
I know we should fix res_counter's scalability problem first,
but this feature is also important for me, so I tried making patches
and they seem to work basically.
I post them(based on mmotm-2009-09-14-01-57) before going further to get some feedbacks.
Basic design:
- Add flag file "memory.migrate_charge" to determine whether charges should be migrated or not. Each bit of "memory.migrate_charge" has meaning(indicate the type of pages the charges of which should be migrated).
- At can_attach(), isolate pages of the task, call __mem_cgroup_try_charge, and move them to a private list.
- Call mem_cgroup_move_account() at attach() about all pages on the private list after necessary checks under page_cgroup lock, and put back them to LRU.
- Cancel charges about all pages remains on the private list on failure or at the end of charge migration, and put back them to LRU.
I think this design is simple but it has a problem when mounted on the same hierarchy with cpuset. This design isolate pages of the task at can_attach(), but attach() of cpuset also tries to isolate pages of the task and migrate them if cpuset.memory_migrate is set. As a result, pages cannot be memory migrated by cpuset if we set memory.migrate_charge. But I think this problem can be handled by user-space to some extent: for example, move the task back and move it again with memory.migrate_charge unset.
So I went to this direction as a first step(I'm considering how to avoid this issue).
Any comments or suggestions would be welcome.
Thanks,
Daisuke Nishimura.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>