Re: [PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-04 Thread Michel Lespinasse
On Sun, Dec 2, 2012 at 7:12 AM, Ingo Molnar wrote: > Subject: [PATCH] mm/rmap, migration: Make rmap_walk_anon() and > try_to_unmap_anon() more scalable > > rmap_walk_anon() and try_to_unmap_anon() appears to be too > careful about locking the anon vma: while it needs protection > against anon

Re: [PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-04 Thread Michel Lespinasse
On Sun, Dec 2, 2012 at 7:12 AM, Ingo Molnar wrote: > * Rik van Riel wrote: > >> >+static inline void anon_vma_lock_read(struct anon_vma *anon_vma) >> >+{ >> >+down_read(_vma->root->rwsem); >> >+} >> >> I see you did not rename anon_vma_lock and anon_vma_unlock to >> anon_vma_lock_write and

Re: [PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-04 Thread Michel Lespinasse
On Sun, Dec 2, 2012 at 7:12 AM, Ingo Molnar mi...@kernel.org wrote: * Rik van Riel r...@redhat.com wrote: +static inline void anon_vma_lock_read(struct anon_vma *anon_vma) +{ +down_read(anon_vma-root-rwsem); +} I see you did not rename anon_vma_lock and anon_vma_unlock to

Re: [PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-04 Thread Michel Lespinasse
On Sun, Dec 2, 2012 at 7:12 AM, Ingo Molnar mi...@kernel.org wrote: Subject: [PATCH] mm/rmap, migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable rmap_walk_anon() and try_to_unmap_anon() appears to be too careful about locking the anon vma: while it needs protection

Re: [PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-02 Thread Rik van Riel
On 12/02/2012 10:12 AM, Ingo Molnar wrote: Rename anon_vma_[un]lock() => anon_vma_[un]lock_write(), to make it clearer that it's an exclusive write-lock in that case - suggested by Rik van Riel. ... close, but you forgot to actually rename the unlock function :) diff --git

[PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-02 Thread Ingo Molnar
* Rik van Riel wrote: > >+static inline void anon_vma_lock_read(struct anon_vma *anon_vma) > >+{ > >+down_read(_vma->root->rwsem); > >+} > > I see you did not rename anon_vma_lock and anon_vma_unlock to > anon_vma_lock_write and anon_vma_unlock_write. > > That could get confusing to

[PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-02 Thread Ingo Molnar
* Rik van Riel r...@redhat.com wrote: +static inline void anon_vma_lock_read(struct anon_vma *anon_vma) +{ +down_read(anon_vma-root-rwsem); +} I see you did not rename anon_vma_lock and anon_vma_unlock to anon_vma_lock_write and anon_vma_unlock_write. That could get confusing to

Re: [PATCH 2/2, v2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

2012-12-02 Thread Rik van Riel
On 12/02/2012 10:12 AM, Ingo Molnar wrote: Rename anon_vma_[un]lock() = anon_vma_[un]lock_write(), to make it clearer that it's an exclusive write-lock in that case - suggested by Rik van Riel. ... close, but you forgot to actually rename the unlock function :) diff --git