Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-12 Thread panxinhui
在 2017/2/10 上午4:53, Waiman Long 写道: > On 02/07/2017 10:39 PM, Xinhui Pan wrote: >> >> >> 2016-12-26 4:26 GMT+08:00 Waiman Long > >: >> >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >> relaxed versions to improve performance on archit

Re: [PATCH v3] locking/qrwlock: Let qrwlock has same layout regardless of the endian

2016-07-14 Thread panxinhui
在 16/7/14 17:37, Peter Zijlstra 写道: On Thu, Jul 14, 2016 at 03:44:42PM +0800, xinhui wrote: OK, so I poked at this a bit and I ended up with the below; but now qrwlock and qspinlock are inconsistent; although I suspect qspinlock is similarly busted wrt endian muck. Not sure what to do.. Let

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-26 Thread panxinhui
> 在 2016年6月26日,22:11,Boqun Feng 写道: > > On Sun, Jun 26, 2016 at 02:58:00PM +0800, panxinhui wrote: > [snip] >>>> >>> >>> Unfortunately, on PPC, we compile pseries code along with powernv code >>> in a kernel binary, therefore we need to wi

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-26 Thread panxinhui
> 在 2016年6月26日,22:29,Boqun Feng 写道: > > On Sun, Jun 26, 2016 at 03:08:20PM +0800, panxinhui wrote: > [snip] >>> @@ -106,6 +109,9 @@ bool osq_lock(struct optimistic_spin_queue *lock) >>> node->prev = prev; >>> WRITE_ONCE(prev->next, n

Re: [PATCH 2/2] locking/osq: Drop the overload of osq_lock()

2016-06-26 Thread panxinhui
> 在 2016年6月26日,18:41,Pan Xinhui 写道: > > An over-committed guest with more vCPUs than pCPUs has a heavy overload > in osq_lock(). > > This is because vCPU A hold the osq lock and yield out, vCPU B wait > per_cpu node->locked to be set. IOW, vCPU B wait vCPU A to run and > unlock the osq lock. >

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-26 Thread panxinhui
> 在 2016年6月26日,14:59,Boqun Feng 写道: > > On Sun, Jun 26, 2016 at 02:10:57PM +0800, Boqun Feng wrote: >> On Sun, Jun 26, 2016 at 01:21:04PM +0800, panxinhui wrote: >>> >>>> 在 2016年6月26日,03:20,Peter Zijlstra 写道: >>>> >>>> On Sun, Jun

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-25 Thread panxinhui
> 在 2016年6月26日,14:10,Boqun Feng 写道: > > On Sun, Jun 26, 2016 at 01:21:04PM +0800, panxinhui wrote: >> >>> 在 2016年6月26日,03:20,Peter Zijlstra 写道: >>> >>> On Sun, Jun 26, 2016 at 01:27:56AM +0800, panxinhui wrote: >>>>>> Would that

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-25 Thread panxinhui
> 在 2016年6月26日,03:20,Peter Zijlstra 写道: > > On Sun, Jun 26, 2016 at 01:27:56AM +0800, panxinhui wrote: >>>> Would that not have issues where the owner cpu is kept running but the >>>> spinner (ie. _this_ vcpu) gets preempted? I would think that in that >&

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-25 Thread panxinhui
> 在 2016年6月26日,03:12,Peter Zijlstra 写道: > > On Sun, Jun 26, 2016 at 01:27:51AM +0800, panxinhui wrote: > >> by the way I still think mutex_unlock has a big overload too. > > Do you mean overhead? > oh, maybe you are right. mutex_unlock ’s implementation uses inc_

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-25 Thread panxinhui
> 在 2016年6月26日,00:45,Boqun Feng 写道: > > On Sat, Jun 25, 2016 at 06:15:40PM +0200, Peter Zijlstra wrote: >> On Sat, Jun 25, 2016 at 11:21:30PM +0800, Boqun Feng wrote: >>> So on PPC, we have lppaca::yield_count to detect when an vcpu is >>> preempted, if the yield_count is even, the vcpu is runni

Re: [PATCH] locking/osq: Drop the overload of osq lock

2016-06-25 Thread panxinhui
> 在 2016年6月26日,00:13,Peter Zijlstra 写道: > > On Sat, Jun 25, 2016 at 06:09:22PM +0200, Peter Zijlstra wrote: >> That works here, but it would not work for the need_resched() in >> mutex_spin_on_owner() and mutex_optimistic_spin() which need equal >> treatment. >> >> Because those too we want to