On Thu, 17 Jun 2010 02:16:47 -0400
Christoph Hellwig <hch@infradead.org> wrote:
Ah, sorry. My question was wrong.
If xfs_buf_allocate() is not for pages on LRU but for kernel memory,
memory cgroup has no reason to charge against it because we can't reclaim
memory which is not on LRU.
Then, I wonder I may have to add following check
if (!(gfp_mask & __GFP_RECLAIMABLE)) {
/* ignore this. we just charge against reclaimable memory on LRU. */
return 0;
}
to mem_cgroup_charge_cache() which is a hook for accounting page-cache.
Thanks,
-Kame
--