Re: Re: [-mm][PATCH 8/10] fix shmem page migration incorrectness on memcgroup

From: kamezawa . hiroyu
Date: Fri Jun 27 2008 - 08:25:46 EST


----- Original Message -----

>> But situation is a bit complicated.
>> - shmem's page is charged as file-cache.
>> - shmem's swap cache is still charged by mem_cgroup_cache_charge() because
>> it's implicitly (to memcg) converted to swap cache.
>> - anon's swap cache is charged by mem_cgroup_uncharge_cache_page()
>>
>I'm sorry if I misunderstand something.
>
>I think anon's swap cache is:
>
>- charged by nowhere as "cache".
yes.
> If anon pages are also on swap cache, charges for them remain charged
> even when mem_cgroup_uncharge_page() is called, because it checks PG_swapca
che.
> So, as a result, anon's swap cache is charged.
yes.

>- uncharged by memcgroup_uncharge_page() in __delete_from_swap_cache()
> after clearing PG_swapcache.
>
>right?
>
You're right. Sorry for confusion.

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/