On Mon, 2007-07-23 at 09:27 -0500, Adam Litke wrote: > Hello. hugetlb_instantiation_mutex is an extremely heavy-weight lock > whose days are numbered (hopefully). It exists primarily to arbitrate > a race condition where n (n > 1) threads of execution race to satisfy > the same page fault for a process. Even though only one hugetlb page > is needed, if (n) are not available, the application can receive a > bogus VM_FAULT_OOM. Thanks for your kind comments.
> > Anyway, the hugetlb_instantiation_mutex approach has few friends > around here, so rather than making the code rely more heavily upon it, > perhaps you could focus you efforts on helping us remove it. That's the correct direction. I will check if the mutex could be removed. > > On 7/23/07, Zhang, Yanmin <[EMAIL PROTECTED]> wrote: > > Function hugetlb_fault needn't hold spinlock mm->page_table_lock, > > because when hugetlb_fault is called: > > 1) mm->mmap_sem is held already; > > 2) hugetlb_instantiation_mutex is held by hugetlb_fault, which prevents > > other threads/processes from entering this critical area. It's impossible > > for other threads/processes to change the page table now. > - 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/