All of lore.kernel.org
 help / color / mirror / Atom feed
From: xinhui <xinhui.pan@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, waiman.long@hpe.com
Subject: Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec
Date: Mon, 06 Jun 2016 11:21:13 +0800	[thread overview]
Message-ID: <5754EC29.2090503@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160603113703.GK3190@twins.programming.kicks-ass.net>



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.

  reply	other threads:[~2016-06-06  3:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03  9:48 [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec Pan Xinhui
2016-06-03 11:37 ` Peter Zijlstra
2016-06-06  3:21   ` xinhui [this message]
2016-06-03 21:20 ` Waiman Long
2016-06-03 21:35   ` Peter Zijlstra
2016-06-06  4:48     ` xinhui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5754EC29.2090503@linux.vnet.ibm.com \
    --to=xinhui.pan@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=waiman.long@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.