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


Groups > linux.kernel > #1414582

Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec

From xinhui <xinhui.pan@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec
Date 2016-06-06 05:30 +0200
Message-ID <rGToK-7AE-27@gated-at.bofh.it> (permalink)
References <rFTTQ-1rX-9@gated-at.bofh.it> <rFVCh-2xA-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2016年06月03日 19:37, Peter Zijlstra wrote:
> On Fri, Jun 03, 2016 at 05:48:50PM +0800, Pan Xinhui wrote:
>> queued_spin_lock_slowpath should not worry about interrupt change
>> node->count by accident because ->count is inc and dec when we
>> enter/leave queued_spin_lock_slowpath.
>>
>> So this_cpu_dec() does some no point things here, lets use this_cpu_ptr
>> for a small optimization.
>
> Uhm, have you actually looked at what that does on x86?
>
yep, just one instruction inc/dec.

well, with my patch, there are two instructions.

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


Thread

[PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-03 11:50 +0200
  Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of  this_cpu_dec Peter Zijlstra <peterz@infradead.org> - 2016-06-03 13:40 +0200
    Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-06 05:30 +0200
  Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec Waiman Long <waiman.long@hpe.com> - 2016-06-03 23:30 +0200
    Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of  this_cpu_dec Peter Zijlstra <peterz@infradead.org> - 2016-06-03 23:40 +0200
      Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-06 06:50 +0200

csiph-web