Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550250

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

From Waiman Long <longman@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs
Date 2017-01-03 23:10 +0100
Message-ID <sVFrk-48v-25@gated-at.bofh.it> (permalink)
References <sSnAB-2cx-11@gated-at.bofh.it> <sVArE-DT-23@gated-at.bofh.it>
Organization Red Hat

Show all headers | View raw


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.
 
>> All the locking related cmpxchg's are replaced with the _acquire
>> variants:
>>  - pv_queued_spin_steal_lock()
>>  - trylock_clear_pending()
> So these seem to make sense in that they're in 'fast' paths..
>
>> The cmpxchg's related to hashing are replaced by either by the _release
>> or the _relaxed variants. See the inline comment for details.
>
> But these not so much, we're going to put the vcpu to sleep, why does it
> make sense to 'optimize' the wait/kick stuff?

I haven't thought too much about fast/slow paths when I was making the
patch. You are right that we properly don't need to do that for the
slowpath cases. I can modify the patch to do just the fast patch change.

Cheers,
Longman

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs Waiman Long <longman@redhat.com> - 2016-12-25 21:30 +0100
  Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Boqun Feng <boqun.feng@gmail.com> - 2016-12-26 07:00 +0100
    Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Waiman Long <longman@redhat.com> - 2017-01-03 23:30 +0100
  Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Peter Zijlstra <peterz@infradead.org> - 2017-01-03 17:50 +0100
    Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Waiman Long <longman@redhat.com> - 2017-01-03 23:10 +0100
      Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Peter Zijlstra <peterz@infradead.org> - 2017-01-04 10:50 +0100
        Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Pan Xinhui <xinhui@linux.vnet.ibm.com> - 2017-01-05 10:20 +0100
          Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Peter Zijlstra <peterz@infradead.org> - 2017-01-05 10:50 +0100
          Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Boqun Feng <boqun.feng@gmail.com> - 2017-01-05 11:10 +0100
          Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Waiman Long <longman@redhat.com> - 2017-01-05 16:20 +0100
            Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Boqun Feng <boqun.feng@gmail.com> - 2017-01-05 16:50 +0100
        Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve  performance on some archs Waiman Long <longman@redhat.com> - 2017-01-05 16:40 +0100

csiph-web