On 18/11/2016 15:08, Andi Kleen wrote: > Laurent Dufour <ldufour@xxxxxxxxxxxxxxxxxx> writes: > >> This is a port on kernel 4.8 of the work done by Peter Zijlstra to >> handle page fault without holding the mm semaphore. > > One of the big problems with patches like this today is that it is > unclear what mmap_sem actually protects. It's a big lock covering lots > of code. Parts in the core VM, but also do VM callbacks in file systems > and drivers rely on it too? > > IMHO the first step is a comprehensive audit and then writing clear > documentation on what it is supposed to protect. Then based on that such > changes can be properly evaluated. Hi Andi, Sorry for the late answer... I do agree, this semaphore is massively used and it would be nice to have all its usage documented. I'm currently tracking all the mmap_sem use in 4.8 kernel (about 380 hits) and I'm trying to identify which it is protecting. In addition, I think it may be nice to limit its usage to code under mm/ so that in the future it may be easier to find its usage. Thanks, Laurent. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>