[PATCH v5 2/6] powerpc: pseries/Kconfig: Add qspinlock build config

2016-06-02 Thread Pan Xinhui
pseries will use qspinlock by default. Signed-off-by: Pan Xinhui --- arch/powerpc/platforms/pseries/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index bec90fb..f669323 100644 --- a/arch/powerpc

[PATCH] locking/qrwlock: fix write unlock issue in big endian

2016-06-02 Thread Pan Xinhui
strcut __qrwlock has different layout in big endian machine. we need set the __qrwlock->wmode to NULL, and the address is not >cnts in big endian machine. Do as what read unlock does. we are lucky that the __qrwlock->wmode's val is _QW_LOCKED. Signed-off-by: Pan Xinhui --- include/as

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-13 Thread Pan Xinhui
Hello Peter, On 2016年04月12日 22:30, Peter Zijlstra wrote: > On Sun, Apr 10, 2016 at 10:17:28PM +0800, Pan Xinhui wrote: >> >> On 2016年04月08日 15:47, Peter Zijlstra wrote: >>> On Fri, Apr 08, 2016 at 02:41:46PM +0800, Pan Xinhui wrote: >>>> From: pan xinhui &g

Re: [PATCH] powerpc: introduce {cmp}xchg for u8 and u16

2016-04-14 Thread Pan Xinhui
Hello, Waiman On 2016年04月13日 23:53, Waiman Long wrote: > On 04/13/2016 07:15 AM, Pan Xinhui wrote: >> Hello Peter, >> >> On 2016年04月12日 22:30, Peter Zijlstra wrote: >> >>>> I am working on the qspinlock implementation on PPC. >>>> Your and Waiman

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

2016-04-14 Thread Pan Xinhui
On 2016年04月14日 08:21, 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

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

2016-04-14 Thread Pan Xinhui
On 2016年04月14日 04:59, 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 hol

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

2016-04-14 Thread Pan Xinhui
cpu_halted, ph->prev_cpu); } /* any comments are welcome. I put my patch here just for simplicity, or need I send it out in a new thread? thanks xinhui On 2016年04月14日 17:36, Pan Xinhui wrote: > > > On 2016年04月14日 04:59, Waiman Long wrote: >> Pan Xinhui was asking

Re: [PATCH V3] powerpc: Implement {cmp}xchg for u8 and u16

2016-04-21 Thread Pan Xinhui
On 2016年04月20日 22:24, Peter Zijlstra wrote: > On Wed, Apr 20, 2016 at 09:24:00PM +0800, Pan Xinhui wrote: > >> +#define __XCHG_GEN(cmp, type, sfx, skip, v) \ >> +static __always_inline unsigned long >> \

Re: [PATCH V3] powerpc: Implement {cmp}xchg for u8 and u16

2016-04-21 Thread Pan Xinhui
On 2016年04月21日 23:52, Boqun Feng wrote: > On Thu, Apr 21, 2016 at 11:35:07PM +0800, Pan Xinhui wrote: >> On 2016年04月20日 22:24, Peter Zijlstra wrote: >>> On Wed, Apr 20, 2016 at 09:24:00PM +0800, Pan Xinhui wrote: >>> >>>> +#de

Re: [PATCH V3] powerpc: Implement {cmp}xchg for u8 and u16

2016-04-25 Thread Pan Xinhui
On 2016年04月22日 00:13, Peter Zijlstra wrote: > On Thu, Apr 21, 2016 at 11:35:07PM +0800, Pan Xinhui wrote: >> yes, you are right. more load/store will be done in C code. >> However such xchg_u8/u16 is just used by qspinlock now. and I did not see >> any performance regress

[PATCH] locking/qspinlock: Use atomic_sub_return_release in queued_spin_unlock

2016-06-03 Thread Pan Xinhui
The existing version uses a heavy barrier while only release semantics is required. So use atomic_sub_return_release instead. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Pan Xinhui --- include/asm-generic/qspinlock.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff

[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

Re: [PATCH resend ] tty/n_gsm.c: use gsm->num to remove mux itself from gsm_mux[]

2016-01-04 Thread Pan Xinhui
you are right. i still have many confusion. but tears came out several times:( when i am back, i will reply you again. thx xinhui On 2015-12-14 23:40 , One Thousand Gnomes Wrote: On Mon, 14 Dec 2015 15:08:03 +0800 Pan Xinhui wrote: From: Pan Xinhui There is one filed gsm->num to store mux's

[PATCH V2] tty/n_gsm.c: use gsm->num to remove mux itself from gsm_mux[]

2016-01-04 Thread Pan Xinhui
From: Pan Xinhui There is one filed gsm->num to store mux's index of gsm_mux[]. So use gsm->num to remove itself from gsm_mux[] instead of the for-loop traverse in gsm_cleanup_mux(). Signed-off-by: Pan Xinhui --- change from V1: lock is also held for the if() --- drivers/tty/n

[PATCH resend ] tty/n_gsm.c: use gsm->num to remove mux itself from gsm_mux[]

2015-12-13 Thread Pan Xinhui
From: Pan Xinhui There is one filed gsm->num to store mux's index of gsm_mux[]. So use gsm->num to remove itself from gsm_mux[] instead of the for-loop traverse in gsm_cleanup_mux(). Signed-off-by: Pan Xinhui --- drivers/tty/n_gsm.c | 14 +- 1 files changed, 5 insertions

[tip:locking/core] locking/qspinlock: Use atomic_sub_return_release() in queued_spin_unlock()

2016-06-08 Thread tip-bot for Pan Xinhui
Commit-ID: ca50e426f96c905e7d14a9c7a6bd4e0330516047 Gitweb: http://git.kernel.org/tip/ca50e426f96c905e7d14a9c7a6bd4e0330516047 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Fri, 3 Jun 2016 16:38:14 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate

[tip:locking/core] locking/pvqspinlock: Fix a bug in qstat_read()

2016-08-10 Thread tip-bot for Pan Xinhui
Commit-ID: c2ace36b884de9330c4149064ae8d212d2e0d9ee Gitweb: http://git.kernel.org/tip/c2ace36b884de9330c4149064ae8d212d2e0d9ee Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 13 Jul 2016 18:23:34 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/qrwlock: Fix write unlock bug on big endian systems

2016-08-10 Thread tip-bot for pan xinhui
Commit-ID: 2db34e8bf9a22f4e38b29deccee57457bc0e7d74 Gitweb: http://git.kernel.org/tip/2db34e8bf9a22f4e38b29deccee57457bc0e7d74 Author: pan xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Mon, 18 Jul 2016 17:47:39 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/qspinlock: Use __this_cpu_dec() instead of full-blown this_cpu_dec()

2016-06-27 Thread tip-bot for Pan Xinhui
Commit-ID: 0dceeaf599e6d9b8bd908ba4bd3dfee84aa26be2 Gitweb: http://git.kernel.org/tip/0dceeaf599e6d9b8bd908ba4bd3dfee84aa26be2 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Tue, 14 Jun 2016 14:37:27 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/pv-qspinlock: Use cmpxchg_release() in __pv_queued_spin_unlock()

2016-09-22 Thread tip-bot for Pan Xinhui
Commit-ID: b193049375b04df3ada8c3347b7083db95918bc3 Gitweb: http://git.kernel.org/tip/b193049375b04df3ada8c3347b7083db95918bc3 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Mon, 19 Sep 2016 05:23:52 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] kvm: Introduce kvm_write_guest_offset_cached()

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 4ec6e863625625a54f527464ab91ce1a1cb16c42 Gitweb: http://git.kernel.org/tip/4ec6e863625625a54f527464ab91ce1a1cb16c42 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:34 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/core, x86/paravirt: Implement vcpu_is_preempted(cpu) for KVM and Xen guests

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 446f3dc8cc0af59259c6c8b898726fae7ed2c055 Gitweb: http://git.kernel.org/tip/446f3dc8cc0af59259c6c8b898726fae7ed2c055 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:33 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] x86/kvm: Support the vCPU preemption check

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 0b9f6c4615c993d2b552e0d2bd1ade49b56e5beb Gitweb: http://git.kernel.org/tip/0b9f6c4615c993d2b552e0d2bd1ade49b56e5beb Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:35 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] x86/kvm: Support the vCPU preemption check

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 1885aa7041c9e801e5d5b093b9dad38937ca37f6 Gitweb: http://git.kernel.org/tip/1885aa7041c9e801e5d5b093b9dad38937ca37f6 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:36 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/mutex: Break out of expensive busy-loop on {mutex,rwsem}_spin_on_owner() when owner vCPU is preempted

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 05ffc951392df57edecc2519327b169210c3df75 Gitweb: http://git.kernel.org/tip/05ffc951392df57edecc2519327b169210c3df75 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:30 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] Documentation/virtual/kvm: Support the vCPU preemption check

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 3dd3e0ce7989b645eee0174b17f5095e187c7f28 Gitweb: http://git.kernel.org/tip/3dd3e0ce7989b645eee0174b17f5095e187c7f28 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:38 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/osq: Break out of spin-wait busy waiting loop for a preempted vCPU in osq_lock()

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 5aff60a191e579ae00ae5ca6ce16c13b687bc8a3 Gitweb: http://git.kernel.org/tip/5aff60a191e579ae00ae5ca6ce16c13b687bc8a3 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:29 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] sched/core: Introduce the vcpu_is_preempted(cpu) interface

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: d9345c65eb7930ac6755cf593ee7686f4029ccf4 Gitweb: http://git.kernel.org/tip/d9345c65eb7930ac6755cf593ee7686f4029ccf4 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:28 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/core, powerpc: Implement vcpu_is_preempted(cpu)

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 41946c86876ea6a3e8857182356e6d76dbfe7fb6 Gitweb: http://git.kernel.org/tip/41946c86876ea6a3e8857182356e6d76dbfe7fb6 Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Wed, 2 Nov 2016 05:08:31 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] locking/pvqspinlock: Don't wait if vCPU is preempted

2017-01-12 Thread tip-bot for Pan Xinhui
Commit-ID: 75437bb304b20a2b350b9a8e9f9238d5e24e12ba Gitweb: http://git.kernel.org/tip/75437bb304b20a2b350b9a8e9f9238d5e24e12ba Author: Pan Xinhui <xinhui@linux.vnet.ibm.com> AuthorDate: Tue, 10 Jan 2017 02:56:46 -0500 Committer: Ingo Molnar <mi...@kernel.org> CommitDate:

[tip:locking/core] sched/core: Introduce the vcpu_is_preempted(cpu) interface

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: d9345c65eb7930ac6755cf593ee7686f4029ccf4 Gitweb: http://git.kernel.org/tip/d9345c65eb7930ac6755cf593ee7686f4029ccf4 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:28 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:05 +0100 sched/core: Introduce

[tip:locking/core] locking/core, powerpc: Implement vcpu_is_preempted(cpu)

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 41946c86876ea6a3e8857182356e6d76dbfe7fb6 Gitweb: http://git.kernel.org/tip/41946c86876ea6a3e8857182356e6d76dbfe7fb6 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:31 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:06 +0100 locking/core, powerpc

[tip:locking/core] locking/core, x86/paravirt: Implement vcpu_is_preempted(cpu) for KVM and Xen guests

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 446f3dc8cc0af59259c6c8b898726fae7ed2c055 Gitweb: http://git.kernel.org/tip/446f3dc8cc0af59259c6c8b898726fae7ed2c055 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:33 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:07 +0100 locking/core, x86/paravirt

[tip:locking/core] kvm: Introduce kvm_write_guest_offset_cached()

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 4ec6e863625625a54f527464ab91ce1a1cb16c42 Gitweb: http://git.kernel.org/tip/4ec6e863625625a54f527464ab91ce1a1cb16c42 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:34 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:07 +0100 kvm: Introduce

[tip:locking/core] Documentation/virtual/kvm: Support the vCPU preemption check

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 3dd3e0ce7989b645eee0174b17f5095e187c7f28 Gitweb: http://git.kernel.org/tip/3dd3e0ce7989b645eee0174b17f5095e187c7f28 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:38 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:09 +0100 Documentation/virtual/kvm

[tip:locking/core] locking/osq: Break out of spin-wait busy waiting loop for a preempted vCPU in osq_lock()

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 5aff60a191e579ae00ae5ca6ce16c13b687bc8a3 Gitweb: http://git.kernel.org/tip/5aff60a191e579ae00ae5ca6ce16c13b687bc8a3 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:29 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:10 +0100 locking/osq: Break out

[tip:locking/core] x86/kvm: Support the vCPU preemption check

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 0b9f6c4615c993d2b552e0d2bd1ade49b56e5beb Gitweb: http://git.kernel.org/tip/0b9f6c4615c993d2b552e0d2bd1ade49b56e5beb Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:35 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:08 +0100 x86/kvm: Support the vCPU

[tip:locking/core] x86/kvm: Support the vCPU preemption check

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 1885aa7041c9e801e5d5b093b9dad38937ca37f6 Gitweb: http://git.kernel.org/tip/1885aa7041c9e801e5d5b093b9dad38937ca37f6 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:36 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:08 +0100 x86/kvm: Support the vCPU

[tip:locking/core] locking/mutex: Break out of expensive busy-loop on {mutex,rwsem}_spin_on_owner() when owner vCPU is preempted

2016-11-22 Thread tip-bot for Pan Xinhui
Commit-ID: 05ffc951392df57edecc2519327b169210c3df75 Gitweb: http://git.kernel.org/tip/05ffc951392df57edecc2519327b169210c3df75 Author: Pan Xinhui AuthorDate: Wed, 2 Nov 2016 05:08:30 -0400 Committer: Ingo Molnar CommitDate: Tue, 22 Nov 2016 12:48:10 +0100 locking/mutex: Break out

[tip:locking/core] locking/pv-qspinlock: Use cmpxchg_release() in __pv_queued_spin_unlock()

2016-09-22 Thread tip-bot for Pan Xinhui
Commit-ID: b193049375b04df3ada8c3347b7083db95918bc3 Gitweb: http://git.kernel.org/tip/b193049375b04df3ada8c3347b7083db95918bc3 Author: Pan Xinhui AuthorDate: Mon, 19 Sep 2016 05:23:52 -0400 Committer: Ingo Molnar CommitDate: Thu, 22 Sep 2016 15:25:51 +0200 locking/pv-qspinlock: Use

[tip:locking/core] locking/pvqspinlock: Don't wait if vCPU is preempted

2017-01-12 Thread tip-bot for Pan Xinhui
Commit-ID: 75437bb304b20a2b350b9a8e9f9238d5e24e12ba Gitweb: http://git.kernel.org/tip/75437bb304b20a2b350b9a8e9f9238d5e24e12ba Author: Pan Xinhui AuthorDate: Tue, 10 Jan 2017 02:56:46 -0500 Committer: Ingo Molnar CommitDate: Thu, 12 Jan 2017 09:35:57 +0100 locking/pvqspinlock: Don't

[tip:locking/core] locking/qrwlock: Fix write unlock bug on big endian systems

2016-08-10 Thread tip-bot for pan xinhui
Commit-ID: 2db34e8bf9a22f4e38b29deccee57457bc0e7d74 Gitweb: http://git.kernel.org/tip/2db34e8bf9a22f4e38b29deccee57457bc0e7d74 Author: pan xinhui AuthorDate: Mon, 18 Jul 2016 17:47:39 +0800 Committer: Ingo Molnar CommitDate: Wed, 10 Aug 2016 14:13:27 +0200 locking/qrwlock: Fix write

[tip:locking/core] locking/pvqspinlock: Fix a bug in qstat_read()

2016-08-10 Thread tip-bot for Pan Xinhui
Commit-ID: c2ace36b884de9330c4149064ae8d212d2e0d9ee Gitweb: http://git.kernel.org/tip/c2ace36b884de9330c4149064ae8d212d2e0d9ee Author: Pan Xinhui AuthorDate: Wed, 13 Jul 2016 18:23:34 +0800 Committer: Ingo Molnar CommitDate: Wed, 10 Aug 2016 14:13:29 +0200 locking/pvqspinlock: Fix

[tip:locking/core] locking/qspinlock: Use __this_cpu_dec() instead of full-blown this_cpu_dec()

2016-06-27 Thread tip-bot for Pan Xinhui
Commit-ID: 0dceeaf599e6d9b8bd908ba4bd3dfee84aa26be2 Gitweb: http://git.kernel.org/tip/0dceeaf599e6d9b8bd908ba4bd3dfee84aa26be2 Author: Pan Xinhui AuthorDate: Tue, 14 Jun 2016 14:37:27 +0800 Committer: Ingo Molnar CommitDate: Mon, 27 Jun 2016 11:37:41 +0200 locking/qspinlock: Use

[tip:locking/core] locking/qspinlock: Use atomic_sub_return_release() in queued_spin_unlock()

2016-06-08 Thread tip-bot for Pan Xinhui
Commit-ID: ca50e426f96c905e7d14a9c7a6bd4e0330516047 Gitweb: http://git.kernel.org/tip/ca50e426f96c905e7d14a9c7a6bd4e0330516047 Author: Pan Xinhui AuthorDate: Fri, 3 Jun 2016 16:38:14 +0800 Committer: Ingo Molnar CommitDate: Wed, 8 Jun 2016 15:17:01 +0200 locking/qspinlock: Use

<    2   3   4   5   6   7