From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v4 2/3] locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs Date: Thu, 14 Feb 2019 12:12:11 +0100 Message-ID: <20190214111211.GL32494@hirez.programming.kicks-ass.net> References: <1550095217-12047-1-git-send-email-longman@redhat.com> <1550095217-12047-3-git-send-email-longman@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Geert Uytterhoeven Cc: "linux-ia64@vger.kernel.org" , Linux-sh list , Will Deacon , Linux Kernel Mailing List , "H. Peter Anvin" , sparclinux , linux-riscv@lists.infradead.org, Christoph Hellwig , Linux-Arch , linux-s390 , Davidlohr Bueso , linux-c6x-dev@linux-c6x.org, "open list:QUALCOMM HEXAGON..." , the arch/x86 maintainers , Ingo Molnar , Waiman Long , "moderated list:H8/300 ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Arnd Bergmann , linux-um@lists.infradead.org, linuxppc-dev , linux-m68k List-Id: linux-arch.vger.kernel.org On Thu, Feb 14, 2019 at 11:54:47AM +0100, Geert Uytterhoeven wrote: > On Wed, Feb 13, 2019 at 11:01 PM Waiman Long wrote: > > Currently, we have two different implementation of rwsem: > > 1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c) > > 2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c) > > > > As we are going to use a single generic implementation for rwsem-xadd.c > > and no architecture-specific code will be needed, there is no point > > in keeping two different implementations of rwsem. In most cases, the > > performance of rwsem-spinlock.c will be worse. It also doesn't get all > > the performance tuning and optimizations that had been implemented in > > rwsem-xadd.c over the years. > > > > For simplication, we are going to remove rwsem-spinlock.c and make all > > architectures use a single implementation of rwsem - rwsem-xadd.c. > > > > All references to RWSEM_GENERIC_SPINLOCK and RWSEM_XCHGADD_ALGORITHM > > in the code are removed. > > > > Suggested-by: Peter Zijlstra > > Signed-off-by: Waiman Long > > Note that this conflicts with "[PATCH 03/11] kernel/locks: consolidate > RWSEM_GENERIC_* options" > https://lore.kernel.org/lkml/20190213174005.28785-4-hch@lst.de/ *sigh*.. of that never was Cc'ed to locking people :/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:34400 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728131AbfBNLMZ (ORCPT ); Thu, 14 Feb 2019 06:12:25 -0500 Date: Thu, 14 Feb 2019 12:12:11 +0100 From: Peter Zijlstra Subject: Re: [PATCH v4 2/3] locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs Message-ID: <20190214111211.GL32494@hirez.programming.kicks-ass.net> References: <1550095217-12047-1-git-send-email-longman@redhat.com> <1550095217-12047-3-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Geert Uytterhoeven Cc: Waiman Long , Christoph Hellwig , Ingo Molnar , Will Deacon , Thomas Gleixner , "linux-ia64@vger.kernel.org" , Linux-sh list , linux-mips@vger.kernel.org, "H. Peter Anvin" , sparclinux , linux-riscv@lists.infradead.org, Linux-Arch , linux-s390 , Davidlohr Bueso , linux-c6x-dev@linux-c6x.org, "open list:QUALCOMM HEXAGON..." , the arch/x86 maintainers , "moderated list:H8/300 ARCHITECTURE" , linux-xtensa@linux-xtensa.org, Arnd Bergmann , linux-um@lists.infradead.org, linux-m68k , Openrisc , Borislav Petkov , Linux ARM , Tim Chen , Parisc List , Linus Torvalds , Linux Kernel Mailing List , alpha , nios2-dev@lists.rocketboards.org, Andrew Morton , linuxppc-dev Message-ID: <20190214111211.Zz4JLUBLm4iMV2I1EaQtWszvprA6uZ_UN5mNKMeBl04@z> On Thu, Feb 14, 2019 at 11:54:47AM +0100, Geert Uytterhoeven wrote: > On Wed, Feb 13, 2019 at 11:01 PM Waiman Long wrote: > > Currently, we have two different implementation of rwsem: > > 1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c) > > 2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c) > > > > As we are going to use a single generic implementation for rwsem-xadd.c > > and no architecture-specific code will be needed, there is no point > > in keeping two different implementations of rwsem. In most cases, the > > performance of rwsem-spinlock.c will be worse. It also doesn't get all > > the performance tuning and optimizations that had been implemented in > > rwsem-xadd.c over the years. > > > > For simplication, we are going to remove rwsem-spinlock.c and make all > > architectures use a single implementation of rwsem - rwsem-xadd.c. > > > > All references to RWSEM_GENERIC_SPINLOCK and RWSEM_XCHGADD_ALGORITHM > > in the code are removed. > > > > Suggested-by: Peter Zijlstra > > Signed-off-by: Waiman Long > > Note that this conflicts with "[PATCH 03/11] kernel/locks: consolidate > RWSEM_GENERIC_* options" > https://lore.kernel.org/lkml/20190213174005.28785-4-hch@lst.de/ *sigh*.. of that never was Cc'ed to locking people :/