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

2016-06-05 Thread xinhui
On 2016年06月04日 05:35, Peter Zijlstra wrote: On Fri, Jun 03, 2016 at 05:20:10PM -0400, Waiman Long wrote: On 06/03/2016 05:48 AM, 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 queue

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

2016-06-05 Thread xinhui
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() doe

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

2016-06-03 Thread Peter Zijlstra
On Fri, Jun 03, 2016 at 05:20:10PM -0400, Waiman Long wrote: > On 06/03/2016 05:48 AM, 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_cp

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

2016-06-03 Thread Waiman Long
On 06/03/2016 05:48 AM, 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 op

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

2016-06-03 Thread Peter Zijlstra
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 t

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

2016-06-03 Thread Pan Xinhui
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. Signed-off-by: Pan Xinhui ---