Skip to content

Commit 390a0c6

Browse files
Waiman-LongIngo Molnar
authored andcommitted
locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs
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 <peterz@infradead.org> Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-riscv@lists.infradead.org Cc: linux-um@lists.infradead.org Cc: linux-xtensa@linux-xtensa.org Cc: linuxppc-dev@lists.ozlabs.org Cc: nios2-dev@lists.rocketboards.org Cc: openrisc@lists.librecores.org Cc: uclinux-h8-devel@lists.sourceforge.jp Link: https://lkml.kernel.org/r/20190322143008.21313-3-longman@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 46ad084 commit 390a0c6

File tree

31 files changed

+2
-520
lines changed

31 files changed

+2
-520
lines changed

arch/alpha/Kconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ config MMU
4949
bool
5050
default y
5151

52-
config RWSEM_GENERIC_SPINLOCK
53-
bool
54-
55-
config RWSEM_XCHGADD_ALGORITHM
56-
bool
57-
default y
58-
5952
config ARCH_HAS_ILOG2_U32
6053
bool
6154
default n

arch/arc/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ config SCHED_OMIT_FRAME_POINTER
6363
config GENERIC_CSUM
6464
def_bool y
6565

66-
config RWSEM_GENERIC_SPINLOCK
67-
def_bool y
68-
6966
config ARCH_DISCONTIGMEM_ENABLE
7067
def_bool n
7168

arch/arm/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ config TRACE_IRQFLAGS_SUPPORT
178178
bool
179179
default !CPU_V7M
180180

181-
config RWSEM_XCHGADD_ALGORITHM
182-
bool
183-
default y
184-
185181
config ARCH_HAS_ILOG2_U32
186182
bool
187183

arch/arm64/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,6 @@ config LOCKDEP_SUPPORT
237237
config TRACE_IRQFLAGS_SUPPORT
238238
def_bool y
239239

240-
config RWSEM_XCHGADD_ALGORITHM
241-
def_bool y
242-
243240
config GENERIC_BUG
244241
def_bool y
245242
depends on BUG

arch/c6x/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ config MMU
2727
config FPU
2828
def_bool n
2929

30-
config RWSEM_GENERIC_SPINLOCK
31-
def_bool y
32-
3330
config GENERIC_CALIBRATE_DELAY
3431
def_bool y
3532

arch/csky/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ config GENERIC_HWEIGHT
9292
config MMU
9393
def_bool y
9494

95-
config RWSEM_GENERIC_SPINLOCK
96-
def_bool y
97-
9895
config STACKTRACE_SUPPORT
9996
def_bool y
10097

arch/h8300/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ config H8300
2727
config CPU_BIG_ENDIAN
2828
def_bool y
2929

30-
config RWSEM_GENERIC_SPINLOCK
31-
def_bool y
32-
3330
config GENERIC_HWEIGHT
3431
def_bool y
3532

arch/hexagon/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ config GENERIC_CSUM
6565
config GENERIC_IRQ_PROBE
6666
def_bool y
6767

68-
config RWSEM_GENERIC_SPINLOCK
69-
def_bool n
70-
71-
config RWSEM_XCHGADD_ALGORITHM
72-
def_bool y
73-
7468
config GENERIC_HWEIGHT
7569
def_bool y
7670

arch/ia64/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ config STACKTRACE_SUPPORT
8383
config GENERIC_LOCKBREAK
8484
def_bool n
8585

86-
config RWSEM_XCHGADD_ALGORITHM
87-
bool
88-
default y
89-
9086
config HUGETLB_PAGE_SIZE_VARIABLE
9187
bool
9288
depends on HUGETLB_PAGE

arch/m68k/Kconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ config M68K
3232
config CPU_BIG_ENDIAN
3333
def_bool y
3434

35-
config RWSEM_GENERIC_SPINLOCK
36-
bool
37-
default y
38-
39-
config RWSEM_XCHGADD_ALGORITHM
40-
bool
41-
4235
config ARCH_HAS_ILOG2_U32
4336
bool
4437

0 commit comments

Comments
 (0)