[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 06 Jun 2016 11:21:13 +0800
From: xinhui <xinhui.pan@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: linux-kernel@...r.kernel.org, mingo@...hat.com, waiman.long@....com
Subject: Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec
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.
Powered by blists - more mailing lists