Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex
From: Hugh Dickins <hughd@google.com>
Date: 2011-06-17 22:20:34
Also in:
lkml
On Fri, 17 Jun 2011, Linus Torvalds wrote:
On Fri, Jun 17, 2011 at 11:32 AM, Peter Zijlstra [off-list ref] wrote:quoted
something like so I guess, completely untested etc..Having gone over it a bit more, I actually think I prefer to just special-case the allocation instead. We already have to drop the anon_vma lock for the "out of memory" case, and a slight re-organization of clone_anon_vma() makes it easy to just first try a NOIO allocation with the lock still held, and then if that fails do the "drop lock, retry, and hard-fail" case. IOW, something like the attached (on top of the patches already posted except for your memory reclaim thing) Hugh, does this fix the lockdep issue?
Yes, that fixed the lockdep issue, and ran nicely under load for an hour. I agree that it's better to do this GFP_NOWAIT and fallback, than trylock the anon_vma. And I'm happy that you've still got that WARN_ON_ONCE(root) in: I do not have a fluid mental model of the anon_vma_chains, get lost there; and though it's obvious that we must have the same anon_vma->root going down the same_anon_vma list, I could not put my finger on a killer demonstration for why the same has to be true of the same_vma list. But I've not seen your WARN_ON_ONCE fire, and it's hard to imagine how there could be more than one root in the whole bundle of lists. Hugh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>