Re: [PATCH 1/2] mm: Take all anon_vma locks in anon_vma_lock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Monday, May 3, 2010 - 11:19 am

On Mon, 3 May 2010, Rik van Riel wrote:

But that's exactly what we do in rmap_walk() anyway.

But yes, I can well imagine that in other cases we only do the one 
anon_vma. I didn't check who used the lock.

So if we do want to keep the lock in the anon_vma, I would just suggest 
that instead of making "normal" users do lots of locking, make the 
rmap_walk side one.


Heh. AIM7. Wasn't that why we merged the multiple anon_vma's in the first 
place?


Do we care?

We've not locked them all there, and we've historically not cares about 
the rmap list being "perfect", have we? 

So I _think_ it's just the migration case (and apparently potentially the 
hugepage case) that wants _exact_ information. Which is why I suggest the 
onus of the extra locking should be on _them_, not on the regular code.

I dunno. Again, my objections to the patches are really based more on a 
gut feel of "that can't be the right thing to do" than anything else.

We have _extremely_ few places that walk lists to lock things. And they 
are never "normal" code. Things like that magic "mm_take_all_locks()", for 
example. That is why I then react with "that can't be right" to patches 
like this.

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/2] mm: Take all anon_vma locks in anon_vma_lock, Andrea Arcangeli, (Mon May 3, 10:02 am)
Re: [PATCH 1/2] mm: Take all anon_vma locks in anon_vma_lock, Andrea Arcangeli, (Mon May 3, 10:18 am)
Re: [PATCH 1/2] mm: Take all anon_vma locks in anon_vma_lock, Andrea Arcangeli, (Mon May 3, 11:13 am)
Re: [PATCH 1/2] mm: Take all anon_vma locks in anon_vma_lock, Linus Torvalds, (Mon May 3, 11:19 am)