Hello Vivek. On Fri, Mar 27, 2015 at 05:06:13PM -0400, Vivek Goyal wrote: > I was curious to know that why do we need this "struct page *page" when > trying to attach a inode to a bdi_writeback. Is using current's cgroup > always not sufficient? So, memcg's page ownership is first-use based and it never gets updated once set till the page is released which means that there can be corner cases where an inode is mostly faulted in by one cgroup and then constantly dirtied by another. Because the ownership belongs to the initial cgroup which instantiated those pages, cgroup writeback ends up considering the pages as belonging to that initial cgroup and the foreign detection will trigger if it's being written by a different cgroup. Hmmmm... this isn't a huge problem as once the foreign detection triggers, the problem will be corrected but still when the page is availalbe, I think it makes sense to attach to the page as that's what actually defines the ownership. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html