Re: [PATCH v6 0/9] memcg: per cgroup dirty page accounting

From: Vivek Goyal
Date: Wed Mar 16 2011 - 13:07:52 EST

On Wed, Mar 16, 2011 at 05:35:10PM +0100, Johannes Weiner wrote:

> > IIUC, this sounds more like a solution to quickly come up with a list of
> > inodes one should be writting back. One could also come up with this kind of
> > list by going through memcg->lru list also (approximate). So this can be
> > an improvement over going through memcg->lru instead go through
> > memcg->mapping_list.
> Well, if you operate on a large file it may make a difference between
> taking five inodes off the list and crawling through hundreds of
> thousands of pages to get to those same five inodes.
> And having efficient inode lookup for a memcg makes targetted
> background writeback more feasible: pass the memcg in the background
> writeback work and have the flusher go through memcg->mappings,
> selecting those that match the bdi.
> Am I missing something? I feel like I missed your point.

No. Thanks for the explanation. I get it. Walking through the memcg->lru
list to figure out inodes memcg is writting to will be slow and can be
very painful for large files. Keeping a more direct mapping like
memcg_mapping list per memcg can simplify it a lot.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at