public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hpe.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, <linux-kernel@vger.kernel.org>,
	Pan Xinhui <xinhui@linux.vnet.ibm.com>,
	Scott J Norton <scott.norton@hpe.com>,
	Douglas Hatch <doug.hatch@hpe.com>
Subject: Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to pv_wait()
Date: Wed, 13 Apr 2016 21:59:15 -0400	[thread overview]
Message-ID: <570EF973.4000402@hpe.com> (raw)
In-Reply-To: <20160414002135.GP2906@worktop>

On 04/13/2016 08:21 PM, Peter Zijlstra wrote:
> On Wed, Apr 13, 2016 at 04:59:20PM -0400, Waiman Long wrote:
>> Pan Xinhui was asking for a lock holder cpu argument in pv_wait()
>> to help the porting of pvqspinlock to PPC. The new argument will can
>> potentially help hypervisor expediate the execution of the critical
>> section so that the lock holder vCPU can release the lock sooner.
>>
>> This patch does just that by storing the previous node vCPU number.
>> In pv_wait_head_or_lock(), pv_wait() will be called with that vCPU
>> number as it is likely to be the lock holder. In pv_wait_node(),
>> -1 will be passed to pv_wait() instead to indicate that it doesn't
>> know what the current lock holder is.
> Without knowing why he needs this, it is very hard to tell if this will
> suffice.
>
> Xinhui, what do you need the extra argument for?

I have some other people asking me if pvqspinlock was able to pass in 
information about which CPU was the lock holder before as he cited the 
PPC code has this capability to somehow kick up the vCPU that has the 
lock. That can be potentially useful in x86 too.

Cheers,
Longman

  reply	other threads:[~2016-04-14  1:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 20:59 [PATCH] locking/pvqspinlock: Add lock holder CPU argument to pv_wait() Waiman Long
2016-04-14  0:21 ` Peter Zijlstra
2016-04-14  1:59   ` Waiman Long [this message]
2016-04-14  8:39   ` Pan Xinhui
2016-04-14  9:36 ` Pan Xinhui
2016-04-14 14:34   ` Pan Xinhui
2016-04-14 18:47     ` Waiman Long

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=570EF973.4000402@hpe.com \
    --to=waiman.long@hpe.com \
    --cc=doug.hatch@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=scott.norton@hpe.com \
    --cc=xinhui@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox