Re: [PATCH -V4 08/10] hugetlbfs: Add a list for tracking in-use HugeTLB pages
From: Michal Hocko <hidden>
Date: 2012-03-29 08:12:16
Also in:
linux-mm, lkml
On Wed 28-03-12 23:08:34, Aneesh Kumar K.V wrote:
Michal Hocko [off-list ref] writes:quoted
On Fri 16-03-12 23:09:28, Aneesh Kumar K.V wrote:quoted
From: "Aneesh Kumar K.V" <redacted> hugepage_activelist will be used to track currently used HugeTLB pages. We need to find the in-use HugeTLB pages to support memcg removal. On memcg removal we update the page's memory cgroup to point to parent cgroup. Signed-off-by: Aneesh Kumar K.V <redacted> --- include/linux/hugetlb.h | 1 + mm/hugetlb.c | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-)diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index cbd8dc5..6919100 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h[...]quoted
@@ -2319,14 +2322,24 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, page = pte_page(pte); if (pte_dirty(pte)) set_page_dirty(page); - list_add(&page->lru, &page_list); + + spin_lock(&hugetlb_lock); + list_move(&page->lru, &page_list); + spin_unlock(&hugetlb_lock);Why do we really need the spinlock here?It does a list_del from hugepage_activelist.
right you are. sorry -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- 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>