Re: [kvm-devel] EMM: disable other notifiers before register and unregister

2008-04-04 Thread Andrea Arcangeli
On Thu, Apr 03, 2008 at 12:20:41PM -0700, Christoph Lameter wrote: On Thu, 3 Apr 2008, Andrea Arcangeli wrote: My attempt to fix this once and for all is to walk all vmas of the mm inside mmu_notifier_register and take all anon_vma locks and i_mmap_locks in virtual address order in a row.

Re: [kvm-devel] EMM: disable other notifiers before register and unregister

2008-04-03 Thread Peter Zijlstra
On Wed, 2008-04-02 at 18:24 -0700, Christoph Lameter wrote: Ok lets forget about the single theaded thing to solve the registration races. As Andrea pointed out this still has ssues with other subscribed subsystems (and also try_to_unmap). We could do something like what stop_machine_run

Re: [kvm-devel] EMM: disable other notifiers before register and unregister

2008-04-03 Thread Andrea Arcangeli
On Wed, Apr 02, 2008 at 06:24:15PM -0700, Christoph Lameter wrote: Ok lets forget about the single theaded thing to solve the registration races. As Andrea pointed out this still has ssues with other subscribed subsystems (and also try_to_unmap). We could do something like what

Re: [kvm-devel] EMM: disable other notifiers before register and unregister

2008-04-03 Thread Christoph Lameter
On Thu, 3 Apr 2008, Andrea Arcangeli wrote: My attempt to fix this once and for all is to walk all vmas of the mm inside mmu_notifier_register and take all anon_vma locks and i_mmap_locks in virtual address order in a row. It's ok to take those inside the mmap_sem. Supposedly if anybody will

[kvm-devel] EMM: disable other notifiers before register and unregister

2008-04-02 Thread Christoph Lameter
Ok lets forget about the single theaded thing to solve the registration races. As Andrea pointed out this still has ssues with other subscribed subsystems (and also try_to_unmap). We could do something like what stop_machine_run does: First disable all running subsystems before registering a