Re: [PATCH -V4 05/10] hugetlb: add charge/uncharge calls for HugeTLB alloc/free
From: Aneesh Kumar K.V <hidden>
Date: 2012-03-30 10:55:46
Also in:
linux-mm, lkml
Michal Hocko [off-list ref] writes:
On Wed 28-03-12 23:09:34, Aneesh Kumar K.V wrote:quoted
Michal Hocko [off-list ref] writes:quoted
On Fri 16-03-12 23:09:25, Aneesh Kumar K.V wrote:quoted
From: "Aneesh Kumar K.V" <redacted> This adds necessary charge/uncharge calls in the HugeTLB codeThis begs for more description... Other than that it looks correct.Updated as below hugetlb: add charge/uncharge calls for HugeTLB alloc/free This adds necessary charge/uncharge calls in the HugeTLB code. We do memcg charge in page alloc and uncharge in compound page destructor. We also need to ignore HugeTLB pages in __mem_cgroup_uncharge_common because that get called from delete_from_page_cacheand from mem_cgroup_end_migration used during soft_offline_page. Btw., while looking at mem_cgroup_end_migration, I have noticed that you need to take care of mem_cgroup_prepare_migration as well otherwise the page would get charged as a normal (shmem) page.
Won't we skip HugeTLB pages in migrate ? check_range do check for is_vm_hugetlb_page. -aneesh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>