[lkml]   [2011]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: REGRESSION: Performance regressions from switching anon_vma->lock to mutex
On Fri, Jun 17, 2011 at 4:28 AM, Peter Zijlstra <> wrote:
> Something like so? Compiles and runs the benchmark in question.


Except I really think that test for a NULL anon_vma should go away.

If an avc entry has a NULL anon_vma, something is seriously wrong. The
comment about anon_vma_fork failure is definitely just bogus: the
anon_vma is allocated before the avc entry, so there's no way a avc
can have a NULL anon_vma from there.

But yes, your patch is cleaner than the one I was playing around with
(your "remove if not list empty" is prettier than what I was toying
with - having a separate flag in the avc)

Tim, can you test Peter's (second - the cleaned up one) patch on top
of mine, and see if that helps things further?

The only thing I don't love about the batching is that we now do hold
the lock over some situations where we _could_ have allowed
concurrency (notably some avc allocations), but I think it's a good
trade-off. And walking the list twice at unlink_anon_vmas() should be
basically free.


 \ /
  Last update: 2011-06-17 18:51    [W:0.098 / U:0.148 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site