> 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.
Linux Filesystem, Storage, and Memory Management Summit, Day 1
Posted Apr 5, 2011 19:56 UTC (Tue) by hnaz (subscriber, #67104)
[Link]
It would essentially describe one specific combination of an inode and a memory cgroup.
We want these objects also for another reason: memcg writeback. We can string them up and have a list of inodes of interest when pushing back the dirty limit of a specific memory cgroup.