Cc: Jack Steiner <steiner@...>, Nick Piggin <npiggin@...>, <akpm@...>, Robin Holt <holt@...>, Avi Kivity <avi@...>, Izik Eidus <izike@...>, <kvm-devel@...>, Peter Zijlstra <a.p.zijlstra@...>, <general@...>, Steve Wise <swise@...>, Roland Dreier <rdreier@...>, Kanoj Sarcar <kanojsarcar@...>, <linux-kernel@...>, <linux-mm@...>, <daniel.blueman@...>
This is not going to work even if the mutex would work as easily as you
think since the patch here still does an rcu_lock/unlock around a callback.
Changing the locking for the callouts for users of the mmu notivier that
f.e. require a response via the network (RDMA, XPMEM etc) is not trivial
at all. RCU lock cannot be used. So we are looking at totally disjunct
methods for those users who have to sleep.
Who disarms the notifier? Why is the method not called to disarm the
notifier on exit?
Well a bit better but now we have to modify both the macro and the code
in teh VM. It would be easier to put the notify call in here.
The release should be called much earlier to allow the driver to release
all resources in one go. This way each vma must be processed individually.
For our gobs of memory this method may create a scaling problem on exit().
--