mbox series

[v3,0/5] Switch arm64 over to qrwlock

Message ID 1507810851-306-1-git-send-email-will.deacon@arm.com
Headers show
Series Switch arm64 over to qrwlock | expand

Message

Will Deacon Oct. 12, 2017, 12:20 p.m. UTC
Hello,

This is version three of the patches previously posted here:

v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534666.html
v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534981.html

Changes since v2 include:

  * Drop unused cnt argument
  * Fix typo in UNLOCK Kconfig inlining options
  * Added Tested-by tags

Thanks to all of those who provided review and testing feedback!

Will

--->8

Will Deacon (5):
  kernel/locking: Use struct qrwlock instead of struct __qrwlock
  locking/atomic: Add atomic_cond_read_acquire
  kernel/locking: Use atomic_cond_read_acquire when spinning in qrwlock
  arm64: locking: Move rwlock implementation over to qrwlocks
  kernel/locking: Prevent slowpath writers getting held up by fastpath

 arch/arm64/Kconfig                      |  17 ++++
 arch/arm64/include/asm/Kbuild           |   1 +
 arch/arm64/include/asm/spinlock.h       | 164 +-------------------------------
 arch/arm64/include/asm/spinlock_types.h |   6 +-
 include/asm-generic/atomic-long.h       |   3 +
 include/asm-generic/qrwlock.h           |  37 ++-----
 include/asm-generic/qrwlock_types.h     |  15 ++-
 include/linux/atomic.h                  |   4 +
 kernel/locking/qrwlock.c                |  86 +++--------------
 9 files changed, 61 insertions(+), 272 deletions(-)

-- 
2.1.4

Comments

Adam Wallis Oct. 12, 2017, 1:16 p.m. UTC | #1
On 10/12/2017 8:20 AM, Will Deacon wrote:
> Hello,

> 

> This is version three of the patches previously posted here:

> 

> v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534666.html

> v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534981.html

> 

> Changes since v2 include:

> 

>   * Drop unused cnt argument

>   * Fix typo in UNLOCK Kconfig inlining options

>   * Added Tested-by tags

> 

> Thanks to all of those who provided review and testing feedback!

> 

> Will

> 

> --->8

> 

> Will Deacon (5):

>   kernel/locking: Use struct qrwlock instead of struct __qrwlock

>   locking/atomic: Add atomic_cond_read_acquire

>   kernel/locking: Use atomic_cond_read_acquire when spinning in qrwlock

>   arm64: locking: Move rwlock implementation over to qrwlocks

>   kernel/locking: Prevent slowpath writers getting held up by fastpath

> 

>  arch/arm64/Kconfig                      |  17 ++++

>  arch/arm64/include/asm/Kbuild           |   1 +

>  arch/arm64/include/asm/spinlock.h       | 164 +-------------------------------

>  arch/arm64/include/asm/spinlock_types.h |   6 +-

>  include/asm-generic/atomic-long.h       |   3 +

>  include/asm-generic/qrwlock.h           |  37 ++-----

>  include/asm-generic/qrwlock_types.h     |  15 ++-

>  include/linux/atomic.h                  |   4 +

>  kernel/locking/qrwlock.c                |  86 +++--------------

>  9 files changed, 61 insertions(+), 272 deletions(-)

> 


Will, I see the same performance improvements that I was getting in v2 of the
patch. I will continue to run these patches on multiple systems over the next
few weeks, months for stability/functionality testing as well.

Tested-by: Adam Wallis <awallis@codeaurora.org>


-- 
Adam Wallis
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
Will Deacon Oct. 19, 2017, 4:53 p.m. UTC | #2
Hi all,

On Thu, Oct 12, 2017 at 01:20:46PM +0100, Will Deacon wrote:
> This is version three of the patches previously posted here:

> 

> v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534666.html

> v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534981.html

> 

> Changes since v2 include:

> 

>   * Drop unused cnt argument

>   * Fix typo in UNLOCK Kconfig inlining options

>   * Added Tested-by tags

> 

> Thanks to all of those who provided review and testing feedback!


I've not had any more feedback on this and the testing results are very
encouraging so I'd like to merge it for 4.15. However, it might make more
sense for the whole thing to go via -tip instead.

Ingo, Peter: what do you prefer?

Will

> Will Deacon (5):

>   kernel/locking: Use struct qrwlock instead of struct __qrwlock

>   locking/atomic: Add atomic_cond_read_acquire

>   kernel/locking: Use atomic_cond_read_acquire when spinning in qrwlock

>   arm64: locking: Move rwlock implementation over to qrwlocks

>   kernel/locking: Prevent slowpath writers getting held up by fastpath

> 

>  arch/arm64/Kconfig                      |  17 ++++

>  arch/arm64/include/asm/Kbuild           |   1 +

>  arch/arm64/include/asm/spinlock.h       | 164 +-------------------------------

>  arch/arm64/include/asm/spinlock_types.h |   6 +-

>  include/asm-generic/atomic-long.h       |   3 +

>  include/asm-generic/qrwlock.h           |  37 ++-----

>  include/asm-generic/qrwlock_types.h     |  15 ++-

>  include/linux/atomic.h                  |   4 +

>  kernel/locking/qrwlock.c                |  86 +++--------------

>  9 files changed, 61 insertions(+), 272 deletions(-)

> 

> -- 

> 2.1.4

>
Will Deacon Oct. 24, 2017, 2:48 p.m. UTC | #3
Ingo, Peter,

Would you be willing to merge this via -tip, please? I'm happy to
rebase/repost as required, but the code is in good shape now.

Will

On Thu, Oct 19, 2017 at 05:53:32PM +0100, Will Deacon wrote:
> On Thu, Oct 12, 2017 at 01:20:46PM +0100, Will Deacon wrote:

> > This is version three of the patches previously posted here:

> > 

> > v1: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534666.html

> > v2: http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/534981.html

> > 

> > Changes since v2 include:

> > 

> >   * Drop unused cnt argument

> >   * Fix typo in UNLOCK Kconfig inlining options

> >   * Added Tested-by tags

> > 

> > Thanks to all of those who provided review and testing feedback!

> 

> I've not had any more feedback on this and the testing results are very

> encouraging so I'd like to merge it for 4.15. However, it might make more

> sense for the whole thing to go via -tip instead.

> 

> Ingo, Peter: what do you prefer?

> 

> Will

> 

> > Will Deacon (5):

> >   kernel/locking: Use struct qrwlock instead of struct __qrwlock

> >   locking/atomic: Add atomic_cond_read_acquire

> >   kernel/locking: Use atomic_cond_read_acquire when spinning in qrwlock

> >   arm64: locking: Move rwlock implementation over to qrwlocks

> >   kernel/locking: Prevent slowpath writers getting held up by fastpath

> > 

> >  arch/arm64/Kconfig                      |  17 ++++

> >  arch/arm64/include/asm/Kbuild           |   1 +

> >  arch/arm64/include/asm/spinlock.h       | 164 +-------------------------------

> >  arch/arm64/include/asm/spinlock_types.h |   6 +-

> >  include/asm-generic/atomic-long.h       |   3 +

> >  include/asm-generic/qrwlock.h           |  37 ++-----

> >  include/asm-generic/qrwlock_types.h     |  15 ++-

> >  include/linux/atomic.h                  |   4 +

> >  kernel/locking/qrwlock.c                |  86 +++--------------

> >  9 files changed, 61 insertions(+), 272 deletions(-)

> > 

> > -- 

> > 2.1.4

> >
Ingo Molnar Oct. 24, 2017, 3:40 p.m. UTC | #4
* Will Deacon <will.deacon@arm.com> wrote:

> Ingo, Peter,

> 

> Would you be willing to merge this via -tip, please? I'm happy to

> rebase/repost as required, but the code is in good shape now.


Sure, will do it tomorrow!

Thanks,

	Ingo
Peter Zijlstra Oct. 25, 2017, 8:36 a.m. UTC | #5
On Tue, Oct 24, 2017 at 05:40:45PM +0200, Ingo Molnar wrote:
> 

> * Will Deacon <will.deacon@arm.com> wrote:

> 

> > Ingo, Peter,

> > 

> > Would you be willing to merge this via -tip, please? I'm happy to

> > rebase/repost as required, but the code is in good shape now.

> 

> Sure, will do it tomorrow!


Yeah, ACK on this.
chengjian (D) Oct. 28, 2017, 6:10 a.m. UTC | #6
Hi, all.


On 2017/10/20 0:53, Will Deacon wrote:
> I've not had any more feedback on this and the testing results are very

> encouraging so I'd like to merge it for 4.15. However, it might make more

> sense for the whole thing to go via -tip instead.

>

> Ingo, Peter: what do you prefer?

>

> Will

>

>> Will Deacon (5):

>>    kernel/locking: Use struct qrwlock instead of struct __qrwlock

>>    locking/atomic: Add atomic_cond_read_acquire

>>    kernel/locking: Use atomic_cond_read_acquire when spinning in qrwlock

>>    arm64: locking: Move rwlock implementation over to qrwlocks

>>    kernel/locking: Prevent slowpath writers getting held up by fastpath

>>

>>   arch/arm64/Kconfig                      |  17 ++++

>>   arch/arm64/include/asm/Kbuild           |   1 +

>>   arch/arm64/include/asm/spinlock.h       | 164 +-------------------------------

>>   arch/arm64/include/asm/spinlock_types.h |   6 +-

>>   include/asm-generic/atomic-long.h       |   3 +

>>   include/asm-generic/qrwlock.h           |  37 ++-----

>>   include/asm-generic/qrwlock_types.h     |  15 ++-

>>   include/linux/atomic.h                  |   4 +

>>   kernel/locking/qrwlock.c                |  86 +++--------------

>>   9 files changed, 61 insertions(+), 272 deletions(-)

>>

>> -- 

>> 2.1.4


I am very interested in this change.
Can you share the testing result for me?
Or Test methods, especially test suite and so on.

I would like to further test the performance.

Thanks.
     Cheng Jian