RE: Hugepage regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Gibson wrote on Tuesday, October 10, 2006 6:18 PM
> Can I suggest that you put a big comment on the linked list
> declaration itself saying that you're relying on serialization here.
> Otherwise I'm worried someone will try to de-serialize it again, and
> break it without realizing.  Given the number of people who failed to
> spot the problem with the patch the first time around..


I'm not very good at writing comments, how about the following?

Signed-off-by: Ken Chen <[email protected]>

--- linus-2.6/mm/hugetlb.c.orig	2006-10-10 19:32:36.000000000 -0700
+++ linus-2.6/mm/hugetlb.c	2006-10-10 19:41:18.000000000 -0700
@@ -365,6 +365,11 @@ void __unmap_hugepage_range(struct vm_ar
 	pte_t pte;
 	struct page *page;
 	struct page *tmp;
+	/*
+	 * A page gathering list, protected by per file i_mmap_lock. The
+	 * lock is used to avoid list corruption from multiple unmapping
+	 * of the same page since we are using page->lru.
+	 */
 	LIST_HEAD(page_list);
 
 	WARN_ON(!is_vm_hugetlb_page(vma));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux