Re: [PATCH-tip v3 02/14] locking/rwsem: Make owner available even if !CONFIG_RWSEM_SPIN_ON_OWNER

From: Ingo Molnar
Date: Tue Apr 16 2019 - 03:53:21 EST



* Waiman Long <longman@xxxxxxxxxx> wrote:

> > It can be seen that a lot more readers got the lock via optimistic
> > spinning.  One possibility is that reader optimistic spinning causes
> > readers to spread out into more lock acquisition groups than without. The
> > K3 results show that grouping more readers into one lock acquisition
> > group help to improve performance for this microbenchmark. I will need
> > to run more tests to find out the root cause of this regression. It is
> > not an easy problem to solve.
>
> Just an update on my will-it-scale regression investigation. I have
> tried various ways to tune the rwsem code to get more performance out
> from this benchmark. I got some minor improvements but nothing major. So
> it looks like that there are some workloads that have performance hurted
> by reader optimistic spinning and this benchmark is one of them. Now I
> am testing an adaptive reader optimistic spinning disabling patch that
> shows great promise as I was able to bring back a major portion of the
> lost performance. I will try to make the patch more aggressive to see if
> it can bring most of the lost performance back.

Thank you!

I've applied your two latest patches to WIP.locking/core as well, to keep
it all tested and to see whether there's any other regressions. It's all
looking good so far in my dogfood testing.

Thanks,

Ingo