Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 16 Jun 2011 14:26:41 -0700 | Subject | Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex |
| |
On Thu, Jun 16, 2011 at 2:06 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Thu, Jun 16, 2011 at 2:05 PM, Linus Torvalds > <torvalds@linux-foundation.org> wrote: >> >> This patch is UNTESTED! > > It was also UNATTACHED!
Hmm. And it doesn't work. We deadlock when we free the anon_vma because the *freeing* path wants to take the anon_vma lock. See that horrid code in anon_vma_free().
So now we now hold the root over the whole series of frees, and get an instant deadlock.
We also can happen to free the root anon_vma before we release the lock in it, which is another slight problem ;)
So the unlink_anon_vmas() case is actually much more complicated than the clone case.
In other words, just forget that second patch. I'll have to think about it.
Linus
| |