Re: [PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Zhang, Yanmin
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

Re: [PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Adam Litke
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

Re: [PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Zhang, Yanmin
On Mon, 2007-07-23 at 16:18 +0800, Zhang, Yanmin 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

[PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Zhang, Yanmin
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

[PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Zhang, Yanmin
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

Re: [PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Zhang, Yanmin
On Mon, 2007-07-23 at 16:18 +0800, Zhang, Yanmin 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

Re: [PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Adam Litke
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)

Re: [PATCH] spinlock in function hugetlb_fault could be deleted

2007-07-23 Thread Zhang, Yanmin
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