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


Groups > linux.kernel > #1378393

Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to pv_wait()

From Waiman Long <waiman.long@hpe.com>
Newsgroups linux.kernel
Subject Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to pv_wait()
Date 2016-04-14 04:00 +0200
Message-ID <rnEJB-2fa-5@gated-at.bofh.it> (permalink)
References <rnA3g-7bV-9@gated-at.bofh.it> <rnDkt-1ob-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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


Thread

[PATCH] locking/pvqspinlock: Add lock holder CPU argument to pv_wait() Waiman Long <Waiman.Long@hpe.com> - 2016-04-13 23:00 +0200
  Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to  pv_wait() Peter Zijlstra <peterz@infradead.org> - 2016-04-14 02:30 +0200
    Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to  pv_wait() Waiman Long <waiman.long@hpe.com> - 2016-04-14 04:00 +0200
    Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to  pv_wait() Pan Xinhui <xinhui@linux.vnet.ibm.com> - 2016-04-14 10:50 +0200
  Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to  pv_wait() Pan Xinhui <xinhui@linux.vnet.ibm.com> - 2016-04-14 11:40 +0200
    Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to  pv_wait() Pan Xinhui <xinhui@linux.vnet.ibm.com> - 2016-04-14 16:40 +0200
      Re: [PATCH] locking/pvqspinlock: Add lock holder CPU argument to  pv_wait() Waiman Long <waiman.long@hpe.com> - 2016-04-14 20:50 +0200

csiph-web