I understand the per-mm pointer overhead back to the cgroup. I don't understand
the part about adding a per-mm pointer back to the "owning" task. We already
have task->mm. BTW, the reason by we directly add the mm_struct to mem_cgroup
mapping is that there are contexts from where only the mm_struct is known (when
we charge/uncharge). Assuming that current->mm's mem_cgorup is the one we want
to charge/uncharge is incorrect.
I am not sure I understand your proposal fully. But, if it can help provide the
flexibility you are referring to, I am all ears.
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--