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

Peter Zijlstra
2011-06-17T18:14:27Z

On Fri, 2011-06-17 at 11:01 -0700, Linus Torvalds wrote:

> So I do think that "page_referenced_anon()" should do a trylock, and
> return "referenced" if the trylock fails. Comments?

The only problem I can immediately see with that is when a single
process' anon memory is dominant, then such an allocation will never
succeed in freeing these pages because the one lock will pin pretty much
all anon. Then again, there's always a few file pages to drop.

That said, its rather unlikely, and iirc people were working on removing
direct reclaim, or at least rely less on it.