lkml.org 
[lkml]   [2017]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs
From
Date


在 2017/1/4 17:41, Peter Zijlstra 写道:
> On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote:
>> On 01/03/2017 11:18 AM, Peter Zijlstra wrote:
>>> On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote:
>>>> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more
>>>> relaxed versions to improve performance on architectures that use LL/SC.
>>> Claim without numbers ;-)
>>
>> Well it is hard to produce actual numbers here as I don't have the setup
>> to gather data.
>
> Surely RHT has big PPC machines around? I know that getting to them is a
> wee bit of a bother, but they should be available somewhere.
>
hi,

I do some tests about cmpxchg and cmpxchg_acquire before on ppc.

loops in 15s of each cmpxchg is below.

cmpxchg_relaxed: 336663
cmpxchg_release: 369054
cmpxchg_acquire: 363364
cmpxchg: 179435

so cmpxchg is really expensive than others.
but I also have doubt about the cmpxchg_relaxed, it should be the cheapest, but from the tests, release/acquire are faster than it.

thanks
xinhui

\
 
 \ /
  Last update: 2017-01-05 10:18    [W:0.112 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site