Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact

From: John Stultz
Date: Thu Aug 25 2016 - 22:20:36 EST


On Wed, Aug 24, 2016 at 2:30 PM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> Hello, John.
>
> On Wed, Aug 24, 2016 at 02:16:52PM -0700, John Stultz wrote:
>> Hey Peter, Tejun, Oleg,
>> So while you're tweaks for the percpu-rwsem have greatly helped the
>> regression folks were seeing (many thanks, by the way), as noted
>> above, the performance regression with the global lock compared to
>> earlier kernels is still ~3x slower (though again, much better then
>> the 80x slower that was seen earlier).
>>
>> So I was wondering if patches to go back to the per signal_struct
>> locking would still be considered? Or is the global lock approach the
>> only way forward?
>
> We can't simply revert but we can make the lock per signal_struct
> again. It's just that it'd be quite a bit more complex (but, again,
> if we need it...) and for cases where migrations aren't as frequent
> percpu-rwsem would be at least a bit lower overhead. Can you please
> test with the following patch applied just in case?
>
> https://git.kernel.org/cgit/linux/kernel/git/tj/cgroup.git/commit/?h=for-4.8-fixes&id=568ac888215c7fb2fabe8ea739b00ec3c1f5d440


Hey! Good news. This patch along with Peter's locking changes pushes
the latencies down to an apparently acceptable level!

Many thanks for the pointer!

thanks
-john