Index: linux-2.6.19-rc6-mm2/mm/hugetlb.c =================================================================== --- linux-2.6.19-rc6-mm2.orig/mm/hugetlb.c 2006-12-04 11:57:01.000000000 -0800 +++ linux-2.6.19-rc6-mm2/mm/hugetlb.c 2006-12-04 11:58:02.000000000 -0800 @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -35,15 +34,8 @@ * * 2. The page_table_lock is used to synchronize page table updates * - * 3. There is another global mutex hugetlb_instantiation_mutex - * serializing all huge page faults which currently limits the - * scalability of huge pages. This lock insures that no new - * allocations are performed between the allocation of a huge - * page and the installation of the page table entry. - * * Lock order: * mmap_sem - * hugetlb_instantiation_mutex * page_table_lock * hugetlb_lock */ @@ -564,22 +556,14 @@ pte_t *ptep; pte_t entry; int ret; - static DEFINE_MUTEX(hugetlb_instantiation_mutex); ptep = huge_pte_alloc(mm, address); if (!ptep) return VM_FAULT_OOM; - /* - * Serialize hugepage allocation and instantiation, so that we don't - * get spurious allocation failures if two CPUs race to instantiate - * the same page in the page cache. - */ - mutex_lock(&hugetlb_instantiation_mutex); entry = *ptep; if (pte_none(entry)) { ret = hugetlb_no_page(mm, vma, address, ptep, write_access); - mutex_unlock(&hugetlb_instantiation_mutex); return ret; } @@ -591,7 +575,6 @@ if (write_access && !pte_write(entry)) ret = hugetlb_cow(mm, vma, address, ptep, entry); spin_unlock(&mm->page_table_lock); - mutex_unlock(&hugetlb_instantiation_mutex); return ret; }