Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex

Linus Torvalds
2011-06-17T18:48:51Z

On Fri, Jun 17, 2011 at 11:39 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Having gone over it a bit more, I actually think I prefer to just
> special-case the allocation instead.

Just to explain my thinking: the thing I disliked most about doing an
allocation while holding the lock wasn't that I thought we would
deadlock on page reclaim. I don't claim that kind of far-sight.

No, the thing I disliked was that if we're low on memory and actually
have to wait, I disliked having the lack of concurrency. I'm ok with
holding the mutex over a few more CPU cycles, but anything longer
might actually hurt throughput. So the patch I just sent out should
fix both the page reclaim deadlock, and avoid any problems with delays
due to holding the critical lock over an expensive allocation.

Linus