Messages in this thread |  | | Date | Fri, 28 Mar 2008 16:21:16 +0530 | | From | Balbir Singh <> | | Subject | Re: [-mm] Add an owner to the mm_struct (v2) |
| |
KAMEZAWA Hiroyuki wrote: > On Fri, 28 Mar 2008 13:53:16 +0530 > Balbir Singh <balbir@linux.vnet.ibm.com> wrote: > >> >> This patch removes the mem_cgroup member from mm_struct and instead adds >> an owner. This approach was suggested by Paul Menage. The advantage of >> this approach is that, once the mm->owner is known, using the subsystem >> id, the cgroup can be determined. It also allows several control groups >> that are virtually grouped by mm_struct, to exist independent of the memory >> controller i.e., without adding mem_cgroup's for each controller, >> to mm_struct. >> >> The code initially assigns mm->owner to the task and then after the >> thread group leader is identified. The mm->owner is changed to the thread >> group leader of the task later at the end of copy_process. >> > Hmm, I like this approach. >
Thanks,
> -a bit off topic- > BTW, could you move mem_cgroup_from_task() to include/linux/memcontrol.h ? >
Yes, that can be done
> Then, I'll add an interface like > mem_cgroup_charge_xxx(struct page *page, struct mem_cgroup *mem, gfp_mask mask) > > This can be called in following way: > mem_cgroup_charge_xxx(page, mem_cgroup_from_task(current), GFP_XXX); > and I don't have to access mm_struct's member in this case. >
OK. Will do. Can that wait until Andrew picks up these patches. Then I'll put that as an add-on?
Thanks for the review
-- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL
|  |