Skip to content

Commit 83fe27e

Browse files
pranithpaulmck
authored andcommitted
rcu: Make SRCU optional by using CONFIG_SRCU
SRCU is not necessary to be compiled by default in all cases. For tinification efforts not compiling SRCU unless necessary is desirable. The current patch tries to make compiling SRCU optional by introducing a new Kconfig option CONFIG_SRCU which is selected when any of the components making use of SRCU are selected. If we do not select CONFIG_SRCU, srcu.o will not be compiled at all. text data bss dec hex filename 2007 0 0 2007 7d7 kernel/rcu/srcu.o Size of arch/powerpc/boot/zImage changes from text data bss dec hex filename 831552 64180 23944 919676 e087c arch/powerpc/boot/zImage : before 829504 64180 23952 917636 e0084 arch/powerpc/boot/zImage : after so the savings are about ~2000 bytes. Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com> CC: Josh Triplett <josh@joshtriplett.org> CC: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> [ paulmck: resolve conflict due to removal of arch/ia64/kvm/Kconfig. ]
1 parent 9735af5 commit 83fe27e

23 files changed

Lines changed: 34 additions & 1 deletion

File tree

‎arch/arm/kvm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ config KVM
2323
select HAVE_KVM_CPU_RELAX_INTERCEPT
2424
select KVM_MMIO
2525
select KVM_ARM_HOST
26+
select SRCU
2627
depends on ARM_VIRT_EXT && ARM_LPAE
2728
---help---
2829
Support hosting virtualized guest machines. You will also

‎arch/arm64/kvm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ config KVM
2626
select KVM_ARM_HOST
2727
select KVM_ARM_VGIC
2828
select KVM_ARM_TIMER
29+
select SRCU
2930
---help---
3031
Support hosting virtualized guest machines.
3132

‎arch/mips/kvm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ config KVM
2020
select PREEMPT_NOTIFIERS
2121
select ANON_INODES
2222
select KVM_MMIO
23+
select SRCU
2324
---help---
2425
Support for hosting Guest kernels.
2526
Currently supported on MIPS32 processors.

‎arch/powerpc/kvm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ config KVM
2121
select PREEMPT_NOTIFIERS
2222
select ANON_INODES
2323
select HAVE_KVM_EVENTFD
24+
select SRCU
2425

2526
config KVM_BOOK3S_HANDLER
2627
bool

‎arch/s390/kvm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ config KVM
2828
select HAVE_KVM_IRQCHIP
2929
select HAVE_KVM_IRQFD
3030
select HAVE_KVM_IRQ_ROUTING
31+
select SRCU
3132
---help---
3233
Support hosting paravirtualized guest machines using the SIE
3334
virtualization capability on the mainframe. This should work

‎arch/tile/kvm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ config KVM
2121
depends on HAVE_KVM && MODULES
2222
select PREEMPT_NOTIFIERS
2323
select ANON_INODES
24+
select SRCU
2425
---help---
2526
Support hosting paravirtualized guest machines.
2627

‎arch/x86/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ config X86
138138
select HAVE_ACPI_APEI_NMI if ACPI
139139
select ACPI_LEGACY_TABLES_LOOKUP if ACPI
140140
select X86_FEATURE_NAMES if PROC_FS
141+
select SRCU
141142

142143
config INSTRUCTION_DECODER
143144
def_bool y

‎arch/x86/kvm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ config KVM
4040
select HAVE_KVM_MSI
4141
select HAVE_KVM_CPU_RELAX_INTERCEPT
4242
select KVM_VFIO
43+
select SRCU
4344
---help---
4445
Support hosting fully virtualized guest machines using hardware
4546
virtualization extensions. You will need a fairly recent

‎drivers/clk/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ config COMMON_CLK
1313
bool
1414
select HAVE_CLK_PREPARE
1515
select CLKDEV_LOOKUP
16+
select SRCU
1617
---help---
1718
The common clock framework is a single definition of struct
1819
clk, useful across many platforms, as well as an

‎drivers/cpufreq/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ menu "CPU Frequency scaling"
22

33
config CPU_FREQ
44
bool "CPU Frequency scaling"
5+
select SRCU
56
help
67
CPU Frequency scaling allows you to change the clock speed of
78
CPUs on the fly. This is a nice method to save power, because

0 commit comments

Comments
 (0)