> The struct mem_cgroup pointer, he things, is excessive; there will usually be a bunch of pages from a single file used in any given control group. So what is really needed is a separate structure to map from a control group to the address_space structure representing the backing store for a set of pages. Ideally, he would point to that structure (instead of struct address_space) in struct page, but that would require some filesystem API changes.
When I initially read this, I thought "Why not extend the address_space?"
I just clarified this with Johannes. There may be multiple cgroups within a single address space, so he's looking to introduce an additional indirection.