Re: [kvm-devel] EMM: Require single threadedness for registration.

2008-04-02 Thread Christoph Lameter
On Thu, 3 Apr 2008, Andrea Arcangeli wrote: > Why can't it fire on the mm_struct where GRU just registered? That > mm_struct existed way before GRU registered, and VM is free to unmap > it w/o mmap_sem if there was any memory pressure. Right. Hmmm... Bad situation. We would have invalidate_start

Re: [kvm-devel] EMM: Require single threadedness for registration.

2008-04-02 Thread Andrea Arcangeli
On Wed, Apr 02, 2008 at 03:06:19PM -0700, Christoph Lameter wrote: > On Thu, 3 Apr 2008, Andrea Arcangeli wrote: > > > That would work for #v10 if I remove the invalidate_range_start from > > try_to_unmap_cluster, it can't work for EMM because you've > > emm_invalidate_start firing anywhere outsid

Re: [kvm-devel] EMM: Require single threadedness for registration.

2008-04-02 Thread Christoph Lameter
On Thu, 3 Apr 2008, Andrea Arcangeli wrote: > That would work for #v10 if I remove the invalidate_range_start from > try_to_unmap_cluster, it can't work for EMM because you've > emm_invalidate_start firing anywhere outside the context of the > current task (even regular rmap code, not just nonline

Re: [kvm-devel] EMM: Require single threadedness for registration.

2008-04-02 Thread Andrea Arcangeli
On Wed, Apr 02, 2008 at 02:05:28PM -0700, Christoph Lameter wrote: > Here is a patch to require single threaded execution during emm_register. > This also allows an easy implementation of an unregister function and gets > rid of the races that Andrea worried about. That would work for #v10 if I r

[kvm-devel] EMM: Require single threadedness for registration.

2008-04-02 Thread Christoph Lameter
Here is a patch to require single threaded execution during emm_register. This also allows an easy implementation of an unregister function and gets rid of the races that Andrea worried about. The approach here is similar to what was used in selinux for security context changes (see selinux_setpr