[PATCH rcu 0/27] Unconditionally enable SRCU

Paul E. McKenney posted 27 patches 2 years, 8 months ago
There is a newer version of this series
arch/arm64/kvm/Kconfig                                      |    1
arch/mips/kvm/Kconfig                                       |    1
arch/powerpc/kvm/Kconfig                                    |    1
arch/riscv/kvm/Kconfig                                      |    1
arch/s390/kvm/Kconfig                                       |    1
arch/x86/Kconfig                                            |    2
arch/x86/kvm/Kconfig                                        |    1
block/Kconfig                                               |    1
drivers/base/core.c                                         |   42 ------------
drivers/clk/Kconfig                                         |    1
drivers/cpufreq/Kconfig                                     |    1
drivers/dax/Kconfig                                         |    1
drivers/devfreq/Kconfig                                     |    1
drivers/hwtracing/stm/Kconfig                               |    1
drivers/md/Kconfig                                          |    1
drivers/net/Kconfig                                         |    1
drivers/opp/Kconfig                                         |    1
drivers/pci/controller/Kconfig                              |    2
fs/btrfs/Kconfig                                            |    1
fs/dlm/Kconfig                                              |    1
fs/locks.c                                                  |   25 -------
fs/notify/Kconfig                                           |    1
fs/quota/Kconfig                                            |    1
init/Kconfig                                                |    1
kernel/notifier.c                                           |    3
kernel/power/Kconfig                                        |    1
kernel/rcu/Kconfig                                          |    3
mm/Kconfig                                                  |    1
tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt |    4 -
29 files changed, 1 insertion(+), 102 deletions(-)
[PATCH rcu 0/27] Unconditionally enable SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
Hello!

This series removes Kconfig "select" clauses and #ifdef directives that
are no longer necessary give that SRCU is now unconditionally enabled,
courtesy of new-age printk() requirements.  Finally, the SRCU Kconfig
option is removed entirely.

1.	arch/x86: Remove "select SRCU".

2.	arch/arm64/kvm: Remove "select SRCU".

3.	arch/mips/kvm: Remove "select SRCU".

4.	arch/powerpc/kvm: Remove "select SRCU".

5.	arch/riscv/kvm: Remove "select SRCU".

6.	arch/s390/kvm: Remove "select SRCU".

7.	block: Remove "select SRCU".

8.	drivers/base: Remove CONFIG_SRCU.

9.	drivers/clk: Remove "select SRCU".

10.	drivers/cpufreq: Remove "select SRCU".

11.	drivers/dax: Remove "select SRCU".

12.	drivers/devfreq: Remove "select SRCU".

13.	drivers/hwtracing/stm: Remove "select SRCU".

14.	drivers/md: Remove "select SRCU".

15.	drivers/net: Remove "select SRCU".

16.	drivers/opp: Remove "select SRCU".

17.	drivers/pci/controller: Remove "select SRCU".

18.	fs/btrfs: Remove "select SRCU".

19.	fs/dlm: Remove "select SRCU".

20.	fs/notify: Remove "select SRCU".

21.	fs/quota: Remove "select SRCU".

22.	init: Remove "select SRCU".

23.	kernel/power: Remove "select SRCU".

24.	mm: Remove "select SRCU".

25.	fs: Remove CONFIG_SRCU.

26.	kernel/notifier: Remove CONFIG_SRCU.

27.	rcu: Remove CONFIG_SRCU.

						Thanx, Paul

------------------------------------------------------------------------

 arch/arm64/kvm/Kconfig                                      |    1 
 arch/mips/kvm/Kconfig                                       |    1 
 arch/powerpc/kvm/Kconfig                                    |    1 
 arch/riscv/kvm/Kconfig                                      |    1 
 arch/s390/kvm/Kconfig                                       |    1 
 arch/x86/Kconfig                                            |    2 
 arch/x86/kvm/Kconfig                                        |    1 
 block/Kconfig                                               |    1 
 drivers/base/core.c                                         |   42 ------------
 drivers/clk/Kconfig                                         |    1 
 drivers/cpufreq/Kconfig                                     |    1 
 drivers/dax/Kconfig                                         |    1 
 drivers/devfreq/Kconfig                                     |    1 
 drivers/hwtracing/stm/Kconfig                               |    1 
 drivers/md/Kconfig                                          |    1 
 drivers/net/Kconfig                                         |    1 
 drivers/opp/Kconfig                                         |    1 
 drivers/pci/controller/Kconfig                              |    2 
 fs/btrfs/Kconfig                                            |    1 
 fs/dlm/Kconfig                                              |    1 
 fs/locks.c                                                  |   25 -------
 fs/notify/Kconfig                                           |    1 
 fs/quota/Kconfig                                            |    1 
 init/Kconfig                                                |    1 
 kernel/notifier.c                                           |    3 
 kernel/power/Kconfig                                        |    1 
 kernel/rcu/Kconfig                                          |    3 
 mm/Kconfig                                                  |    1 
 tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt |    4 -
 29 files changed, 1 insertion(+), 102 deletions(-)
Re: [PATCH rcu 0/27] Unconditionally enable SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
Hello!

This v2 series removes Kconfig "select" clauses and #ifdef directives that
are no longer necessary give that SRCU is now unconditionally enabled,
courtesy of new-age printk() requirements.  Finally, the SRCU Kconfig
option is removed entirely.

1.	arch/x86: Remove "select SRCU".

2.	drivers/base: Remove CONFIG_SRCU.

3.	drivers/cpufreq: Remove "select SRCU".

4.	drivers/dax: Remove "select SRCU".

5.	drivers/hwtracing/stm: Remove "select SRCU".

6.	drivers/md: Remove "select SRCU".

7.	drivers/net: Remove "select SRCU".

8.	drivers/pci/controller: Remove "select SRCU".

9.	fs: Remove CONFIG_SRCU.

10.	fs/btrfs: Remove "select SRCU".

11.	fs/dlm: Remove "select SRCU".

12.	fs/notify: Remove "select SRCU".

13.	fs/quota: Remove "select SRCU".

14.	init: Remove "select SRCU".

15.	kernel/notifier: Remove CONFIG_SRCU.

16.	kernel/power: Remove "select SRCU".

17.	kvm: Remove "select SRCU".

18.	mm: Remove "select SRCU".

19.	tomoyo: Remove "select SRCU".

20.	Remove CONFIG_SRCU.

Changes since v1:

o	Added ack and review tags.

o	Dropped patches taken by their maintainers.

o	Combined the KVM-related commits into a single commit, as requested
	by Sean Christopherson.  Acks received thus far are qualified by
	the corresponding architecture.

o	Added the tomoyo patch based on feedback from Nick Desaulniers.

						Thanx, Paul

------------------------------------------------------------------------

 arch/arm64/kvm/Kconfig                                      |    1 
 arch/mips/kvm/Kconfig                                       |    1 
 arch/powerpc/kvm/Kconfig                                    |    1 
 arch/riscv/kvm/Kconfig                                      |    1 
 arch/s390/kvm/Kconfig                                       |    1 
 arch/x86/Kconfig                                            |    2 
 arch/x86/kvm/Kconfig                                        |    1 
 drivers/base/core.c                                         |   42 ------------
 drivers/cpufreq/Kconfig                                     |    1 
 drivers/dax/Kconfig                                         |    1 
 drivers/hwtracing/stm/Kconfig                               |    1 
 drivers/md/Kconfig                                          |    1 
 drivers/net/Kconfig                                         |    1 
 drivers/pci/controller/Kconfig                              |    2 
 fs/btrfs/Kconfig                                            |    1 
 fs/dlm/Kconfig                                              |    1 
 fs/locks.c                                                  |   25 -------
 fs/notify/Kconfig                                           |    1 
 fs/quota/Kconfig                                            |    1 
 init/Kconfig                                                |    1 
 kernel/notifier.c                                           |    3 
 kernel/power/Kconfig                                        |    1 
 kernel/rcu/Kconfig                                          |    3 
 mm/Kconfig                                                  |    1 
 security/tomoyo/Kconfig                                     |    1 
 tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt |    4 -
 26 files changed, 1 insertion(+), 99 deletions(-)
[PATCH rcu v3 0/27] Unconditionally enable SRCU
Posted by Paul E. McKenney 2 years, 5 months ago
Hello!

This v3 series removes the remaining Kconfig "select" clauses that are
no longer necessary given that SRCU is now unconditionally enabled,
courtesy of new-age printk() requirements.  Finally, the SRCU Kconfig
option is removed entirely.

1.	arch/x86: Remove "select SRCU".

2.	kvm: Remove "select SRCU".

3.	mm: Remove "select SRCU".

4.	Remove CONFIG_SRCU.

						Thanx, Paul

------------------------------------------------------------------------

 arch/arm64/kvm/Kconfig                                      |    1 -
 arch/mips/kvm/Kconfig                                       |    1 -
 arch/powerpc/kvm/Kconfig                                    |    1 -
 arch/riscv/kvm/Kconfig                                      |    1 -
 arch/s390/kvm/Kconfig                                       |    1 -
 arch/x86/Kconfig                                            |    2 --
 arch/x86/kvm/Kconfig                                        |    1 -
 kernel/rcu/Kconfig                                          |    3 ---
 mm/Kconfig                                                  |    1 -
 tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt |    4 ----
 10 files changed, 16 deletions(-)
[PATCH rcu v3 1/4] arch/x86: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 5 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <x86@kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 arch/x86/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a825bf031f49..947e24714c28 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -283,7 +283,6 @@ config X86
 	select RTC_LIB
 	select RTC_MC146818_LIB
 	select SPARSE_IRQ
-	select SRCU
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
 	select TRACE_IRQFLAGS_SUPPORT
@@ -1938,7 +1937,6 @@ config X86_SGX
 	depends on X86_64 && CPU_SUP_INTEL && X86_X2APIC
 	depends on CRYPTO=y
 	depends on CRYPTO_SHA256=y
-	select SRCU
 	select MMU_NOTIFIER
 	select NUMA_KEEP_MEMINFO if NUMA
 	select XARRAY_MULTI
-- 
2.40.0.rc2
[PATCH rcu v3 2/4] kvm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 5 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements from the various KVM Kconfig files.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <kvm@vger.kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org> (arm64)
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Acked-by: Anup Patel <anup@brainfault.org> (riscv)
Acked-by: Heiko Carstens <hca@linux.ibm.com> (s390)
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 arch/arm64/kvm/Kconfig   | 1 -
 arch/mips/kvm/Kconfig    | 1 -
 arch/powerpc/kvm/Kconfig | 1 -
 arch/riscv/kvm/Kconfig   | 1 -
 arch/s390/kvm/Kconfig    | 1 -
 arch/x86/kvm/Kconfig     | 1 -
 6 files changed, 6 deletions(-)

diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index ca6eadeb7d1a..f531da6b362e 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -29,7 +29,6 @@ menuconfig KVM
 	select KVM_MMIO
 	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
 	select KVM_XFER_TO_GUEST_WORK
-	select SRCU
 	select KVM_VFIO
 	select HAVE_KVM_EVENTFD
 	select HAVE_KVM_IRQFD
diff --git a/arch/mips/kvm/Kconfig b/arch/mips/kvm/Kconfig
index 29e51649203b..a8cdba75f98d 100644
--- a/arch/mips/kvm/Kconfig
+++ b/arch/mips/kvm/Kconfig
@@ -26,7 +26,6 @@ config KVM
 	select HAVE_KVM_VCPU_ASYNC_IOCTL
 	select KVM_MMIO
 	select MMU_NOTIFIER
-	select SRCU
 	select INTERVAL_TREE
 	select KVM_GENERIC_HARDWARE_ENABLING
 	help
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
index a9f57dad6d91..902611954200 100644
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
@@ -22,7 +22,6 @@ config KVM
 	select PREEMPT_NOTIFIERS
 	select HAVE_KVM_EVENTFD
 	select HAVE_KVM_VCPU_ASYNC_IOCTL
-	select SRCU
 	select KVM_VFIO
 	select IRQ_BYPASS_MANAGER
 	select HAVE_KVM_IRQ_BYPASS
diff --git a/arch/riscv/kvm/Kconfig b/arch/riscv/kvm/Kconfig
index d5a658a047a7..5682d8c017b3 100644
--- a/arch/riscv/kvm/Kconfig
+++ b/arch/riscv/kvm/Kconfig
@@ -28,7 +28,6 @@ config KVM
 	select KVM_XFER_TO_GUEST_WORK
 	select HAVE_KVM_VCPU_ASYNC_IOCTL
 	select HAVE_KVM_EVENTFD
-	select SRCU
 	help
 	  Support hosting virtualized guest machines.
 
diff --git a/arch/s390/kvm/Kconfig b/arch/s390/kvm/Kconfig
index 33f4ff909476..45fdf2a9b2e3 100644
--- a/arch/s390/kvm/Kconfig
+++ b/arch/s390/kvm/Kconfig
@@ -31,7 +31,6 @@ config KVM
 	select HAVE_KVM_IRQ_ROUTING
 	select HAVE_KVM_INVALID_WAKEUPS
 	select HAVE_KVM_NO_POLL
-	select SRCU
 	select KVM_VFIO
 	select INTERVAL_TREE
 	select MMU_NOTIFIER
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 8e578311ca9d..89ca7f4c1464 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -46,7 +46,6 @@ config KVM
 	select KVM_XFER_TO_GUEST_WORK
 	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
 	select KVM_VFIO
-	select SRCU
 	select INTERVAL_TREE
 	select HAVE_KVM_PM_NOTIFIER if PM
 	select KVM_GENERIC_HARDWARE_ENABLING
-- 
2.40.0.rc2
Re: [PATCH rcu v3 2/4] kvm: Remove "select SRCU"
Posted by Sean Christopherson 2 years, 5 months ago
On Fri, Mar 24, 2023, Paul E. McKenney wrote:
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in selecting it.  Therefore, remove the "select SRCU"
> Kconfig statements from the various KVM Kconfig files.
> 
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Huacai Chen <chenhuacai@kernel.org>
> Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: <kvm@vger.kernel.org>
> Acked-by: Marc Zyngier <maz@kernel.org> (arm64)
> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
> Acked-by: Anup Patel <anup@brainfault.org> (riscv)
> Acked-by: Heiko Carstens <hca@linux.ibm.com> (s390)
> Reviewed-by: John Ogness <john.ogness@linutronix.de>
> ---

As amusing at it would be to see KVM as the lone holdout,

Acked-by: Sean Christopherson <seanjc@google.com> (x86)


Paul, feel free to take this through your tree if you think that would be the
fastest way to purge the config.  Holler if you want to route it through KVM, I'll
either throw it kvm-x86/generic, or rewatch Beetlejuice and try to summon Paolo
that way. ;-)
[PATCH rcu v3 3/4] mm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 5 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 mm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index 4751031f3f05..ebfe5796adf8 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -686,7 +686,6 @@ config BOUNCE
 
 config MMU_NOTIFIER
 	bool
-	select SRCU
 	select INTERVAL_TREE
 
 config KSM
-- 
2.40.0.rc2
[PATCH rcu v3 4/4] rcu: Remove CONFIG_SRCU
Posted by Paul E. McKenney 2 years, 5 months ago
Now that all references to CONFIG_SRCU have been removed, it is time to
remove CONFIG_SRCU itself.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Petr Mladek <pmladek@suse.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 kernel/rcu/Kconfig                                          | 3 ---
 tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
index ab62074174c3..9071182b1284 100644
--- a/kernel/rcu/Kconfig
+++ b/kernel/rcu/Kconfig
@@ -53,9 +53,6 @@ config RCU_EXPERT
 
 	  Say N if you are unsure.
 
-config SRCU
-	def_bool y
-
 config TINY_SRCU
 	bool
 	default y if TINY_RCU
diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
index 42acb1a64ce1..3f5fb66f16df 100644
--- a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
+++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
@@ -71,9 +71,5 @@ CONFIG_TASKS_RCU
 
 	These are controlled by CONFIG_PREEMPT and/or CONFIG_SMP.
 
-CONFIG_SRCU
-
-	Selected by CONFIG_RCU_TORTURE_TEST, so cannot disable.
-
 
 boot parameters ignored: TBD
-- 
2.40.0.rc2
[PATCH rcu v2 01/20] arch/x86: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <x86@kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 arch/x86/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3604074a878b8..4a9175fe7dd18 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -283,7 +283,6 @@ config X86
 	select RTC_LIB
 	select RTC_MC146818_LIB
 	select SPARSE_IRQ
-	select SRCU
 	select SYSCTL_EXCEPTION_TRACE
 	select THREAD_INFO_IN_TASK
 	select TRACE_IRQFLAGS_SUPPORT
@@ -1938,7 +1937,6 @@ config X86_SGX
 	depends on X86_64 && CPU_SUP_INTEL && X86_X2APIC
 	depends on CRYPTO=y
 	depends on CRYPTO_SHA256=y
-	select SRCU
 	select MMU_NOTIFIER
 	select NUMA_KEEP_MEMINFO if NUMA
 	select XARRAY_MULTI
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 02/20] drivers/base: Remove CONFIG_SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in conditional compilation based on CONFIG_SRCU.
Therefore, remove the #ifdef and throw away the #else clause.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/base/core.c | 42 ------------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index a3e14143ec0cf..bb36aca8d1b7a 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -181,7 +181,6 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode)
 }
 EXPORT_SYMBOL_GPL(fw_devlink_purge_absent_suppliers);
 
-#ifdef CONFIG_SRCU
 static DEFINE_MUTEX(device_links_lock);
 DEFINE_STATIC_SRCU(device_links_srcu);
 
@@ -220,47 +219,6 @@ static void device_link_remove_from_lists(struct device_link *link)
 	list_del_rcu(&link->s_node);
 	list_del_rcu(&link->c_node);
 }
-#else /* !CONFIG_SRCU */
-static DECLARE_RWSEM(device_links_lock);
-
-static inline void device_links_write_lock(void)
-{
-	down_write(&device_links_lock);
-}
-
-static inline void device_links_write_unlock(void)
-{
-	up_write(&device_links_lock);
-}
-
-int device_links_read_lock(void)
-{
-	down_read(&device_links_lock);
-	return 0;
-}
-
-void device_links_read_unlock(int not_used)
-{
-	up_read(&device_links_lock);
-}
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-int device_links_read_lock_held(void)
-{
-	return lockdep_is_held(&device_links_lock);
-}
-#endif
-
-static inline void device_link_synchronize_removal(void)
-{
-}
-
-static void device_link_remove_from_lists(struct device_link *link)
-{
-	list_del(&link->s_node);
-	list_del(&link->c_node);
-}
-#endif /* !CONFIG_SRCU */
 
 static bool device_is_ancestor(struct device *dev, struct device *target)
 {
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 02/20] drivers/base: Remove CONFIG_SRCU
Posted by Rafael J. Wysocki 2 years, 8 months ago
On Fri, Jan 13, 2023 at 1:11 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in conditional compilation based on CONFIG_SRCU.
> Therefore, remove the #ifdef and throw away the #else clause.
>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reviewed-by: John Ogness <john.ogness@linutronix.de>

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/base/core.c | 42 ------------------------------------------
>  1 file changed, 42 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index a3e14143ec0cf..bb36aca8d1b7a 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -181,7 +181,6 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode)
>  }
>  EXPORT_SYMBOL_GPL(fw_devlink_purge_absent_suppliers);
>
> -#ifdef CONFIG_SRCU
>  static DEFINE_MUTEX(device_links_lock);
>  DEFINE_STATIC_SRCU(device_links_srcu);
>
> @@ -220,47 +219,6 @@ static void device_link_remove_from_lists(struct device_link *link)
>         list_del_rcu(&link->s_node);
>         list_del_rcu(&link->c_node);
>  }
> -#else /* !CONFIG_SRCU */
> -static DECLARE_RWSEM(device_links_lock);
> -
> -static inline void device_links_write_lock(void)
> -{
> -       down_write(&device_links_lock);
> -}
> -
> -static inline void device_links_write_unlock(void)
> -{
> -       up_write(&device_links_lock);
> -}
> -
> -int device_links_read_lock(void)
> -{
> -       down_read(&device_links_lock);
> -       return 0;
> -}
> -
> -void device_links_read_unlock(int not_used)
> -{
> -       up_read(&device_links_lock);
> -}
> -
> -#ifdef CONFIG_DEBUG_LOCK_ALLOC
> -int device_links_read_lock_held(void)
> -{
> -       return lockdep_is_held(&device_links_lock);
> -}
> -#endif
> -
> -static inline void device_link_synchronize_removal(void)
> -{
> -}
> -
> -static void device_link_remove_from_lists(struct device_link *link)
> -{
> -       list_del(&link->s_node);
> -       list_del(&link->c_node);
> -}
> -#endif /* !CONFIG_SRCU */
>
>  static bool device_is_ancestor(struct device *dev, struct device *target)
>  {
> --
> 2.31.1.189.g2e36527f23
>
[PATCH rcu v2 03/20] drivers/cpufreq: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <linux-pm@vger.kernel.org>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/cpufreq/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 2a84fc63371e2..785541df59379 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -3,7 +3,6 @@ menu "CPU Frequency scaling"
 
 config CPU_FREQ
 	bool "CPU Frequency scaling"
-	select SRCU
 	help
 	  CPU Frequency scaling allows you to change the clock speed of 
 	  CPUs on the fly. This is a nice method to save power, because 
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 03/20] drivers/cpufreq: Remove "select SRCU"
Posted by Rafael J. Wysocki 2 years, 7 months ago
On Fri, Jan 13, 2023 at 1:11 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in selecting it.  Therefore, remove the "select SRCU"
> Kconfig statements.
>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: <linux-pm@vger.kernel.org>
> Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> Reviewed-by: John Ogness <john.ogness@linutronix.de>
> ---
>  drivers/cpufreq/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
> index 2a84fc63371e2..785541df59379 100644
> --- a/drivers/cpufreq/Kconfig
> +++ b/drivers/cpufreq/Kconfig
> @@ -3,7 +3,6 @@ menu "CPU Frequency scaling"
>
>  config CPU_FREQ
>         bool "CPU Frequency scaling"
> -       select SRCU
>         help
>           CPU Frequency scaling allows you to change the clock speed of
>           CPUs on the fly. This is a nice method to save power, because
> --

Applied as 6.3 material, thanks!
Re: [PATCH rcu v2 03/20] drivers/cpufreq: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 7 months ago
On Fri, Jan 20, 2023 at 05:54:17PM +0100, Rafael J. Wysocki wrote:
> On Fri, Jan 13, 2023 at 1:11 AM Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in selecting it.  Therefore, remove the "select SRCU"
> > Kconfig statements.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Cc: <linux-pm@vger.kernel.org>
> > Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> > Reviewed-by: John Ogness <john.ogness@linutronix.de>
> > ---
> >  drivers/cpufreq/Kconfig | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
> > index 2a84fc63371e2..785541df59379 100644
> > --- a/drivers/cpufreq/Kconfig
> > +++ b/drivers/cpufreq/Kconfig
> > @@ -3,7 +3,6 @@ menu "CPU Frequency scaling"
> >
> >  config CPU_FREQ
> >         bool "CPU Frequency scaling"
> > -       select SRCU
> >         help
> >           CPU Frequency scaling allows you to change the clock speed of
> >           CPUs on the fly. This is a nice method to save power, because
> > --
> 
> Applied as 6.3 material, thanks!

Thank you, I will drop it from my tree on my next rebase.

							Thanx, Paul
[PATCH rcu v2 04/20] drivers/dax: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: <nvdimm@lists.linux.dev>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/dax/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index 5fdf269a822e5..2bf5123e48279 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig DAX
 	tristate "DAX: direct access to differentiated memory"
-	select SRCU
 	default m if NVDIMM_DAX
 
 if DAX
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 05/20] drivers/hwtracing/stm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: <linux-stm32@st-md-mailman.stormreply.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/hwtracing/stm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hwtracing/stm/Kconfig b/drivers/hwtracing/stm/Kconfig
index aad594fe79cc5..eda6b11d40a1f 100644
--- a/drivers/hwtracing/stm/Kconfig
+++ b/drivers/hwtracing/stm/Kconfig
@@ -2,7 +2,6 @@
 config STM
 	tristate "System Trace Module devices"
 	select CONFIGFS_FS
-	select SRCU
 	help
 	  A System Trace Module (STM) is a device exporting data in System
 	  Trace Protocol (STP) format as defined by MIPI STP standards.
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 05/20] drivers/hwtracing/stm: Remove "select SRCU"
Posted by Alexander Shishkin 2 years, 8 months ago
"Paul E. McKenney" <paulmck@kernel.org> writes:

> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in selecting it.  Therefore, remove the "select SRCU"
> Kconfig statements.

Accidentally acked the previous version. This appears to be the same.

Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>

Regards,
--
Alex
Re: [PATCH rcu v2 05/20] drivers/hwtracing/stm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
On Fri, Jan 13, 2023 at 05:52:37PM +0200, Alexander Shishkin wrote:
> "Paul E. McKenney" <paulmck@kernel.org> writes:
> 
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in selecting it.  Therefore, remove the "select SRCU"
> > Kconfig statements.
> 
> Accidentally acked the previous version. This appears to be the same.

I somehow missed that ack, probably fat-fingered it.  :-/

> Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>

Thank you!  I will apply this on my next rebase.

							Thanx, Paul
[PATCH rcu v2 06/20] drivers/md: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Song Liu <song@kernel.org>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Mike Snitzer <snitzer@kernel.org>
Cc: <dm-devel@redhat.com>
Cc: <linux-raid@vger.kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/md/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 998a5cfdbc4e9..5f1e2593fad7e 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -6,7 +6,6 @@
 menuconfig MD
 	bool "Multiple devices driver support (RAID and LVM)"
 	depends on BLOCK
-	select SRCU
 	help
 	  Support multiple physical spindles through a single logical device.
 	  Required for RAID and logical volume management.
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 06/20] drivers/md: Remove "select SRCU"
Posted by Mike Snitzer 2 years, 8 months ago
On Thu, Jan 12 2023 at  7:11P -0500,
Paul E. McKenney <paulmck@kernel.org> wrote:

> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in selecting it.  Therefore, remove the "select SRCU"
> Kconfig statements.
> 
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Song Liu <song@kernel.org>
> Cc: Alasdair Kergon <agk@redhat.com>
> Cc: Mike Snitzer <snitzer@kernel.org>
> Cc: <dm-devel@redhat.com>
> Cc: <linux-raid@vger.kernel.org>
> Reviewed-by: John Ogness <john.ogness@linutronix.de>

Acked-by: Mike Snitzer <snitzer@kernel.org>
Re: [PATCH rcu v2 06/20] drivers/md: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
On Tue, Jan 17, 2023 at 06:08:46PM -0500, Mike Snitzer wrote:
> On Thu, Jan 12 2023 at  7:11P -0500,
> Paul E. McKenney <paulmck@kernel.org> wrote:
> 
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in selecting it.  Therefore, remove the "select SRCU"
> > Kconfig statements.
> > 
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: Song Liu <song@kernel.org>
> > Cc: Alasdair Kergon <agk@redhat.com>
> > Cc: Mike Snitzer <snitzer@kernel.org>
> > Cc: <dm-devel@redhat.com>
> > Cc: <linux-raid@vger.kernel.org>
> > Reviewed-by: John Ogness <john.ogness@linutronix.de>
> 
> Acked-by: Mike Snitzer <snitzer@kernel.org>

Will apply on my next rebase, thank you!

							Thanx, Paul
[PATCH rcu v2 07/20] drivers/net: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: <netdev@vger.kernel.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/net/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 9e63b8c43f3e2..12910338ea1a0 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -334,7 +334,6 @@ config NETCONSOLE_DYNAMIC
 
 config NETPOLL
 	def_bool NETCONSOLE
-	select SRCU
 
 config NET_POLL_CONTROLLER
 	def_bool NETPOLL
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 08/20] drivers/pci/controller: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>
Acked-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/pci/controller/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 1569d9a3ada0b..b09cdc59bfd02 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -258,7 +258,7 @@ config PCIE_MEDIATEK_GEN3
 	  MediaTek SoCs.
 
 config VMD
-	depends on PCI_MSI && X86_64 && SRCU && !UML
+	depends on PCI_MSI && X86_64 && !UML
 	tristate "Intel Volume Management Device Driver"
 	help
 	  Adds support for the Intel Volume Management Device (VMD). VMD is a
-- 
2.31.1.189.g2e36527f23

[PATCH rcu v2 09/20] fs: Remove CONFIG_SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in conditional compilation based on CONFIG_SRCU.
Therefore, remove the #ifdef and throw away the #else clause.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 fs/locks.c | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index 8f01bee177159..1909a9de242c8 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1889,7 +1889,6 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp,
 }
 EXPORT_SYMBOL(generic_setlease);
 
-#if IS_ENABLED(CONFIG_SRCU)
 /*
  * Kernel subsystems can register to be notified on any attempt to set
  * a new lease with the lease_notifier_chain. This is used by (e.g.) nfsd
@@ -1923,30 +1922,6 @@ void lease_unregister_notifier(struct notifier_block *nb)
 }
 EXPORT_SYMBOL_GPL(lease_unregister_notifier);
 
-#else /* !IS_ENABLED(CONFIG_SRCU) */
-static inline void
-lease_notifier_chain_init(void)
-{
-}
-
-static inline void
-setlease_notifier(long arg, struct file_lock *lease)
-{
-}
-
-int lease_register_notifier(struct notifier_block *nb)
-{
-	return 0;
-}
-EXPORT_SYMBOL_GPL(lease_register_notifier);
-
-void lease_unregister_notifier(struct notifier_block *nb)
-{
-}
-EXPORT_SYMBOL_GPL(lease_unregister_notifier);
-
-#endif /* IS_ENABLED(CONFIG_SRCU) */
-
 /**
  * vfs_setlease        -       sets a lease on an open file
  * @filp:	file pointer
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 09/20] fs: Remove CONFIG_SRCU
Posted by Jeff Layton 2 years, 8 months ago
On Thu, 2023-01-12 at 16:11 -0800, Paul E. McKenney wrote:
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in conditional compilation based on CONFIG_SRCU.
> Therefore, remove the #ifdef and throw away the #else clause.
> 
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Jeff Layton <jlayton@kernel.org>
> Cc: Chuck Lever <chuck.lever@oracle.com>
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> Cc: <linux-fsdevel@vger.kernel.org>
> Reviewed-by: John Ogness <john.ogness@linutronix.de>
> ---
>  fs/locks.c | 25 -------------------------
>  1 file changed, 25 deletions(-)
> 
> diff --git a/fs/locks.c b/fs/locks.c
> index 8f01bee177159..1909a9de242c8 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -1889,7 +1889,6 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp,
>  }
>  EXPORT_SYMBOL(generic_setlease);
>  
> -#if IS_ENABLED(CONFIG_SRCU)
>  /*
>   * Kernel subsystems can register to be notified on any attempt to set
>   * a new lease with the lease_notifier_chain. This is used by (e.g.) nfsd
> @@ -1923,30 +1922,6 @@ void lease_unregister_notifier(struct notifier_block *nb)
>  }
>  EXPORT_SYMBOL_GPL(lease_unregister_notifier);
>  
> -#else /* !IS_ENABLED(CONFIG_SRCU) */
> -static inline void
> -lease_notifier_chain_init(void)
> -{
> -}
> -
> -static inline void
> -setlease_notifier(long arg, struct file_lock *lease)
> -{
> -}
> -
> -int lease_register_notifier(struct notifier_block *nb)
> -{
> -	return 0;
> -}
> -EXPORT_SYMBOL_GPL(lease_register_notifier);
> -
> -void lease_unregister_notifier(struct notifier_block *nb)
> -{
> -}
> -EXPORT_SYMBOL_GPL(lease_unregister_notifier);
> -
> -#endif /* IS_ENABLED(CONFIG_SRCU) */
> -
>  /**
>   * vfs_setlease        -       sets a lease on an open file
>   * @filp:	file pointer

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Re: [PATCH rcu v2 09/20] fs: Remove CONFIG_SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
On Thu, Jan 12, 2023 at 08:03:48PM -0500, Jeff Layton wrote:
> On Thu, 2023-01-12 at 16:11 -0800, Paul E. McKenney wrote:
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in conditional compilation based on CONFIG_SRCU.
> > Therefore, remove the #ifdef and throw away the #else clause.
> > 
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: Jeff Layton <jlayton@kernel.org>
> > Cc: Chuck Lever <chuck.lever@oracle.com>
> > Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> > Cc: <linux-fsdevel@vger.kernel.org>
> > Reviewed-by: John Ogness <john.ogness@linutronix.de>
> > ---
> >  fs/locks.c | 25 -------------------------
> >  1 file changed, 25 deletions(-)
> > 
> > diff --git a/fs/locks.c b/fs/locks.c
> > index 8f01bee177159..1909a9de242c8 100644
> > --- a/fs/locks.c
> > +++ b/fs/locks.c
> > @@ -1889,7 +1889,6 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp,
> >  }
> >  EXPORT_SYMBOL(generic_setlease);
> >  
> > -#if IS_ENABLED(CONFIG_SRCU)
> >  /*
> >   * Kernel subsystems can register to be notified on any attempt to set
> >   * a new lease with the lease_notifier_chain. This is used by (e.g.) nfsd
> > @@ -1923,30 +1922,6 @@ void lease_unregister_notifier(struct notifier_block *nb)
> >  }
> >  EXPORT_SYMBOL_GPL(lease_unregister_notifier);
> >  
> > -#else /* !IS_ENABLED(CONFIG_SRCU) */
> > -static inline void
> > -lease_notifier_chain_init(void)
> > -{
> > -}
> > -
> > -static inline void
> > -setlease_notifier(long arg, struct file_lock *lease)
> > -{
> > -}
> > -
> > -int lease_register_notifier(struct notifier_block *nb)
> > -{
> > -	return 0;
> > -}
> > -EXPORT_SYMBOL_GPL(lease_register_notifier);
> > -
> > -void lease_unregister_notifier(struct notifier_block *nb)
> > -{
> > -}
> > -EXPORT_SYMBOL_GPL(lease_unregister_notifier);
> > -
> > -#endif /* IS_ENABLED(CONFIG_SRCU) */
> > -
> >  /**
> >   * vfs_setlease        -       sets a lease on an open file
> >   * @filp:	file pointer
> 
> Reviewed-by: Jeff Layton <jlayton@kernel.org>

Thank you!  I will apply this on my next rebase.

							Thanx, Paul
[PATCH rcu v2 10/20] fs/btrfs: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: David Sterba <dsterba@suse.com>
Cc: <linux-btrfs@vger.kernel.org>
Acked-by: David Sterba <dsterba@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 fs/btrfs/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig
index 183e5c4aed348..37b6bab90c835 100644
--- a/fs/btrfs/Kconfig
+++ b/fs/btrfs/Kconfig
@@ -17,7 +17,6 @@ config BTRFS_FS
 	select FS_IOMAP
 	select RAID6_PQ
 	select XOR_BLOCKS
-	select SRCU
 	depends on PAGE_SIZE_LESS_THAN_256KB
 
 	help
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 11/20] fs/dlm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Cc: David Teigland <teigland@redhat.com>
Cc: <cluster-devel@redhat.com>
Acked-by: Anup Patel <anup@brainfault.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 fs/dlm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/dlm/Kconfig b/fs/dlm/Kconfig
index 1105ce3c80cbd..b3b86dbdc1878 100644
--- a/fs/dlm/Kconfig
+++ b/fs/dlm/Kconfig
@@ -4,7 +4,6 @@ menuconfig DLM
 	depends on INET
 	depends on SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n)
 	select IP_SCTP
-	select SRCU
 	help
 	A general purpose distributed lock manager for kernel or userspace
 	applications.
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 12/20] fs/notify: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: <linux-fsdevel@vger.kernel.org>
Acked-by: Jan Kara <jack@suse.cz>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 fs/notify/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/notify/Kconfig b/fs/notify/Kconfig
index c020d26ba223e..c6c72c90fd253 100644
--- a/fs/notify/Kconfig
+++ b/fs/notify/Kconfig
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config FSNOTIFY
 	def_bool n
-	select SRCU
 
 source "fs/notify/dnotify/Kconfig"
 source "fs/notify/inotify/Kconfig"
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 13/20] fs/quota: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Jan Kara <jack@suse.com>
Acked-by: Jan Kara <jack@suse.cz>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 fs/quota/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/quota/Kconfig b/fs/quota/Kconfig
index b59cd172b5f97..d5a85a8062d05 100644
--- a/fs/quota/Kconfig
+++ b/fs/quota/Kconfig
@@ -6,7 +6,6 @@
 config QUOTA
 	bool "Quota support"
 	select QUOTACTL
-	select SRCU
 	help
 	  If you say Y here, you will be able to set per user limits for disk
 	  usage (also called disk quotas). Currently, it works for the
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 14/20] init: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Aaron Tomlin <atomlin@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 init/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index 7e5c3ddc341de..af511c726d695 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1865,7 +1865,6 @@ config PERF_EVENTS
 	default y if PROFILING
 	depends on HAVE_PERF_EVENTS
 	select IRQ_WORK
-	select SRCU
 	help
 	  Enable kernel support for various performance events provided
 	  by software and hardware.
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 15/20] kernel/notifier: Remove CONFIG_SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in conditional compilation based on CONFIG_SRCU.
Therefore, remove the #ifdef.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Borislav Petkov <bp@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 kernel/notifier.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/notifier.c b/kernel/notifier.c
index ab75637fd904f..d353e4b5402d7 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -456,7 +456,6 @@ int raw_notifier_call_chain(struct raw_notifier_head *nh,
 }
 EXPORT_SYMBOL_GPL(raw_notifier_call_chain);
 
-#ifdef CONFIG_SRCU
 /*
  *	SRCU notifier chain routines.    Registration and unregistration
  *	use a mutex, and call_chain is synchronized by SRCU (no locks).
@@ -573,8 +572,6 @@ void srcu_init_notifier_head(struct srcu_notifier_head *nh)
 }
 EXPORT_SYMBOL_GPL(srcu_init_notifier_head);
 
-#endif /* CONFIG_SRCU */
-
 static ATOMIC_NOTIFIER_HEAD(die_chain);
 
 int notrace notify_die(enum die_val val, const char *str,
-- 
2.31.1.189.g2e36527f23

Re: [PATCH rcu v2 15/20] kernel/notifier: Remove CONFIG_SRCU
Posted by Wysocki, Rafael J 2 years, 8 months ago
On 1/13/2023 1:11 AM, Paul E. McKenney wrote:
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in conditional compilation based on CONFIG_SRCU.
> Therefore, remove the #ifdef.
>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Reviewed-by: John Ogness <john.ogness@linutronix.de>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


> ---
>   kernel/notifier.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/kernel/notifier.c b/kernel/notifier.c
> index ab75637fd904f..d353e4b5402d7 100644
> --- a/kernel/notifier.c
> +++ b/kernel/notifier.c
> @@ -456,7 +456,6 @@ int raw_notifier_call_chain(struct raw_notifier_head *nh,
>   }
>   EXPORT_SYMBOL_GPL(raw_notifier_call_chain);
>   
> -#ifdef CONFIG_SRCU
>   /*
>    *	SRCU notifier chain routines.    Registration and unregistration
>    *	use a mutex, and call_chain is synchronized by SRCU (no locks).
> @@ -573,8 +572,6 @@ void srcu_init_notifier_head(struct srcu_notifier_head *nh)
>   }
>   EXPORT_SYMBOL_GPL(srcu_init_notifier_head);
>   
> -#endif /* CONFIG_SRCU */
> -
>   static ATOMIC_NOTIFIER_HEAD(die_chain);
>   
>   int notrace notify_die(enum die_val val, const char *str,
Re: [PATCH rcu v2 15/20] kernel/notifier: Remove CONFIG_SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
On Fri, Jan 13, 2023 at 12:25:48PM +0100, Wysocki, Rafael J wrote:
> 
> On 1/13/2023 1:11 AM, Paul E. McKenney wrote:
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in conditional compilation based on CONFIG_SRCU.
> > Therefore, remove the #ifdef.
> > 
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> > Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
> > Cc: Borislav Petkov <bp@suse.de>
> > Cc: Alan Stern <stern@rowland.harvard.edu>
> > Reviewed-by: John Ogness <john.ogness@linutronix.de>
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Thank you!  I will apply both of your acks on my next rebase.

							Thanx, Paul

> > ---
> >   kernel/notifier.c | 3 ---
> >   1 file changed, 3 deletions(-)
> > 
> > diff --git a/kernel/notifier.c b/kernel/notifier.c
> > index ab75637fd904f..d353e4b5402d7 100644
> > --- a/kernel/notifier.c
> > +++ b/kernel/notifier.c
> > @@ -456,7 +456,6 @@ int raw_notifier_call_chain(struct raw_notifier_head *nh,
> >   }
> >   EXPORT_SYMBOL_GPL(raw_notifier_call_chain);
> > -#ifdef CONFIG_SRCU
> >   /*
> >    *	SRCU notifier chain routines.    Registration and unregistration
> >    *	use a mutex, and call_chain is synchronized by SRCU (no locks).
> > @@ -573,8 +572,6 @@ void srcu_init_notifier_head(struct srcu_notifier_head *nh)
> >   }
> >   EXPORT_SYMBOL_GPL(srcu_init_notifier_head);
> > -#endif /* CONFIG_SRCU */
> > -
> >   static ATOMIC_NOTIFIER_HEAD(die_chain);
> >   int notrace notify_die(enum die_val val, const char *str,
[PATCH rcu v2 16/20] kernel/power: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: <linux-pm@vger.kernel.org>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 kernel/power/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 60a1d3051cc79..4b31629c5be4b 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -118,7 +118,6 @@ config PM_SLEEP
 	def_bool y
 	depends on SUSPEND || HIBERNATE_CALLBACKS
 	select PM
-	select SRCU
 
 config PM_SLEEP_SMP
 	def_bool y
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 16/20] kernel/power: Remove "select SRCU"
Posted by Rafael J. Wysocki 2 years, 7 months ago
On Fri, Jan 13, 2023 at 1:11 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in selecting it.  Therefore, remove the "select SRCU"
> Kconfig statements.
>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: <linux-pm@vger.kernel.org>
> Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
> Reviewed-by: John Ogness <john.ogness@linutronix.de>
> ---
>  kernel/power/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> index 60a1d3051cc79..4b31629c5be4b 100644
> --- a/kernel/power/Kconfig
> +++ b/kernel/power/Kconfig
> @@ -118,7 +118,6 @@ config PM_SLEEP
>         def_bool y
>         depends on SUSPEND || HIBERNATE_CALLBACKS
>         select PM
> -       select SRCU
>
>  config PM_SLEEP_SMP
>         def_bool y
> --

Applied as 6.3 material, thanks!
Re: [PATCH rcu v2 16/20] kernel/power: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 7 months ago
On Fri, Jan 20, 2023 at 05:55:04PM +0100, Rafael J. Wysocki wrote:
> On Fri, Jan 13, 2023 at 1:11 AM Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in selecting it.  Therefore, remove the "select SRCU"
> > Kconfig statements.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> > Cc: Len Brown <len.brown@intel.com>
> > Cc: Pavel Machek <pavel@ucw.cz>
> > Cc: <linux-pm@vger.kernel.org>
> > Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
> > Reviewed-by: John Ogness <john.ogness@linutronix.de>
> > ---
> >  kernel/power/Kconfig | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > index 60a1d3051cc79..4b31629c5be4b 100644
> > --- a/kernel/power/Kconfig
> > +++ b/kernel/power/Kconfig
> > @@ -118,7 +118,6 @@ config PM_SLEEP
> >         def_bool y
> >         depends on SUSPEND || HIBERNATE_CALLBACKS
> >         select PM
> > -       select SRCU
> >
> >  config PM_SLEEP_SMP
> >         def_bool y
> > --
> 
> Applied as 6.3 material, thanks!

Thank you, and I will drop this from my tree on my next rebase.

							Thanx, Paul
[PATCH rcu v2 17/20] kvm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements from the various KVM Kconfig files.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <kvm@vger.kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org> (arm64)
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Acked-by: Anup Patel <anup@brainfault.org> (riscv)
Acked-by: Heiko Carstens <hca@linux.ibm.com> (s390)
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 arch/arm64/kvm/Kconfig   | 1 -
 arch/mips/kvm/Kconfig    | 1 -
 arch/powerpc/kvm/Kconfig | 1 -
 arch/riscv/kvm/Kconfig   | 1 -
 arch/s390/kvm/Kconfig    | 1 -
 arch/x86/kvm/Kconfig     | 1 -
 6 files changed, 6 deletions(-)

diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index 05da3c8f7e88f..312f0e9869111 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -28,7 +28,6 @@ menuconfig KVM
 	select KVM_MMIO
 	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
 	select KVM_XFER_TO_GUEST_WORK
-	select SRCU
 	select KVM_VFIO
 	select HAVE_KVM_EVENTFD
 	select HAVE_KVM_IRQFD
diff --git a/arch/mips/kvm/Kconfig b/arch/mips/kvm/Kconfig
index 91d197bee9c0a..591f46a5d7be1 100644
--- a/arch/mips/kvm/Kconfig
+++ b/arch/mips/kvm/Kconfig
@@ -26,7 +26,6 @@ config KVM
 	select HAVE_KVM_VCPU_ASYNC_IOCTL
 	select KVM_MMIO
 	select MMU_NOTIFIER
-	select SRCU
 	select INTERVAL_TREE
 	help
 	  Support for hosting Guest kernels.
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
index a9f57dad6d916..902611954200d 100644
--- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig
@@ -22,7 +22,6 @@ config KVM
 	select PREEMPT_NOTIFIERS
 	select HAVE_KVM_EVENTFD
 	select HAVE_KVM_VCPU_ASYNC_IOCTL
-	select SRCU
 	select KVM_VFIO
 	select IRQ_BYPASS_MANAGER
 	select HAVE_KVM_IRQ_BYPASS
diff --git a/arch/riscv/kvm/Kconfig b/arch/riscv/kvm/Kconfig
index f36a737d5f96d..6bc9b290c1283 100644
--- a/arch/riscv/kvm/Kconfig
+++ b/arch/riscv/kvm/Kconfig
@@ -27,7 +27,6 @@ config KVM
 	select KVM_XFER_TO_GUEST_WORK
 	select HAVE_KVM_VCPU_ASYNC_IOCTL
 	select HAVE_KVM_EVENTFD
-	select SRCU
 	help
 	  Support hosting virtualized guest machines.
 
diff --git a/arch/s390/kvm/Kconfig b/arch/s390/kvm/Kconfig
index 33f4ff909476c..45fdf2a9b2e32 100644
--- a/arch/s390/kvm/Kconfig
+++ b/arch/s390/kvm/Kconfig
@@ -31,7 +31,6 @@ config KVM
 	select HAVE_KVM_IRQ_ROUTING
 	select HAVE_KVM_INVALID_WAKEUPS
 	select HAVE_KVM_NO_POLL
-	select SRCU
 	select KVM_VFIO
 	select INTERVAL_TREE
 	select MMU_NOTIFIER
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index fbeaa9ddef598..9306d99585188 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -46,7 +46,6 @@ config KVM
 	select KVM_XFER_TO_GUEST_WORK
 	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
 	select KVM_VFIO
-	select SRCU
 	select INTERVAL_TREE
 	select HAVE_KVM_PM_NOTIFIER if PM
 	help
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 17/20] kvm: Remove "select SRCU"
Posted by Sean Christopherson 2 years, 8 months ago
On Thu, Jan 12, 2023, Paul E. McKenney wrote:
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in selecting it.  Therefore, remove the "select SRCU"
> Kconfig statements from the various KVM Kconfig files.
> 
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Huacai Chen <chenhuacai@kernel.org>
> Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: <kvm@vger.kernel.org>
> Acked-by: Marc Zyngier <maz@kernel.org> (arm64)
> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
> Acked-by: Anup Patel <anup@brainfault.org> (riscv)
> Acked-by: Heiko Carstens <hca@linux.ibm.com> (s390)
> Reviewed-by: John Ogness <john.ogness@linutronix.de>
> ---

Reviewed-by: Sean Christopherson <seanjc@google.com>


Ugh, my apologies Paul.  I didn't realize 0cd7e350abc4 ("rcu: Make SRCU mandatory")
is already in Linus' tree, i.e. bundling this in a single patch was unnecessary work
for you.

Anyways, since there isn't an external dependency, this can go through the KVM
tree.  Unless you prefer to take it directly, I'll make sure Paolo sends it along
at some point before v6.2 final.
Re: [PATCH rcu v2 17/20] kvm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
On Wed, Jan 18, 2023 at 01:27:36AM +0000, Sean Christopherson wrote:
> On Thu, Jan 12, 2023, Paul E. McKenney wrote:
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in selecting it.  Therefore, remove the "select SRCU"
> > Kconfig statements from the various KVM Kconfig files.
> > 
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > Cc: Huacai Chen <chenhuacai@kernel.org>
> > Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
> > Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> > Cc: Sean Christopherson <seanjc@google.com>
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Borislav Petkov <bp@alien8.de>
> > Cc: Dave Hansen <dave.hansen@linux.intel.com>
> > Cc: "H. Peter Anvin" <hpa@zytor.com>
> > Cc: <kvm@vger.kernel.org>
> > Acked-by: Marc Zyngier <maz@kernel.org> (arm64)
> > Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
> > Acked-by: Anup Patel <anup@brainfault.org> (riscv)
> > Acked-by: Heiko Carstens <hca@linux.ibm.com> (s390)
> > Reviewed-by: John Ogness <john.ogness@linutronix.de>
> > ---
> 
> Reviewed-by: Sean Christopherson <seanjc@google.com>
> 
> 
> Ugh, my apologies Paul.  I didn't realize 0cd7e350abc4 ("rcu: Make SRCU mandatory")
> is already in Linus' tree, i.e. bundling this in a single patch was unnecessary work
> for you.
> 
> Anyways, since there isn't an external dependency, this can go through the KVM
> tree.  Unless you prefer to take it directly, I'll make sure Paolo sends it along
> at some point before v6.2 final.

I am very happy to have you guys take it.  Just let me know when you
have it in place, and I will drop my copy on my next rebase after that.

							Thanx, Paul
[PATCH rcu v2 18/20] mm: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Andrew Morton
Cc: <linux-mm@kvack.org>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 mm/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index ff7b209dec055..dc660775b7d3f 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -667,7 +667,6 @@ config BOUNCE
 
 config MMU_NOTIFIER
 	bool
-	select SRCU
 	select INTERVAL_TREE
 
 config KSM
-- 
2.31.1.189.g2e36527f23
[PATCH rcu v2 19/20] tomoyo: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in selecting it.  Therefore, remove the "select SRCU"
Kconfig statements.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Paul Moore <paul@paul-moore.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: <linux-security-module@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
---
 security/tomoyo/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/tomoyo/Kconfig b/security/tomoyo/Kconfig
index b9f867100a9ff..a9796b4003124 100644
--- a/security/tomoyo/Kconfig
+++ b/security/tomoyo/Kconfig
@@ -6,7 +6,6 @@ config SECURITY_TOMOYO
 	select SECURITYFS
 	select SECURITY_PATH
 	select SECURITY_NETWORK
-	select SRCU
 	select BUILD_BIN2C
 	default n
 	help
-- 
2.31.1.189.g2e36527f23
Re: [PATCH rcu v2 19/20] tomoyo: Remove "select SRCU"
Posted by Tetsuo Handa 2 years, 8 months ago
On 2023/01/13 9:11, Paul E. McKenney wrote:
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in selecting it.  Therefore, remove the "select SRCU"
> Kconfig statements.

Applied to https://osdn.net/projects/tomoyo/scm/git/tomoyo-test1/commits/1ed8a46256771de283772d482403691807214cf7 .

I will send to linux.git after a few days.

Thank you.
Re: [PATCH rcu v2 19/20] tomoyo: Remove "select SRCU"
Posted by Paul E. McKenney 2 years, 8 months ago
On Fri, Jan 13, 2023 at 11:22:10PM +0900, Tetsuo Handa wrote:
> On 2023/01/13 9:11, Paul E. McKenney wrote:
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in selecting it.  Therefore, remove the "select SRCU"
> > Kconfig statements.
> 
> Applied to https://osdn.net/projects/tomoyo/scm/git/tomoyo-test1/commits/1ed8a46256771de283772d482403691807214cf7 .
> 
> I will send to linux.git after a few days.

Thank you!  I will drop my version of this commit during my next rebase.

							Thanx, Paul
[PATCH rcu v2 20/20] rcu: Remove CONFIG_SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
Now that all references to CONFIG_SRCU have been removed, it is time to
remove CONFIG_SRCU itself.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Petr Mladek <pmladek@suse.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
---
 kernel/rcu/Kconfig                                          | 3 ---
 tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
index ab62074174c32..9071182b1284b 100644
--- a/kernel/rcu/Kconfig
+++ b/kernel/rcu/Kconfig
@@ -53,9 +53,6 @@ config RCU_EXPERT
 
 	  Say N if you are unsure.
 
-config SRCU
-	def_bool y
-
 config TINY_SRCU
 	bool
 	default y if TINY_RCU
diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
index 42acb1a64ce10..3f5fb66f16df7 100644
--- a/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
+++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt
@@ -71,9 +71,5 @@ CONFIG_TASKS_RCU
 
 	These are controlled by CONFIG_PREEMPT and/or CONFIG_SMP.
 
-CONFIG_SRCU
-
-	Selected by CONFIG_RCU_TORTURE_TEST, so cannot disable.
-
 
 boot parameters ignored: TBD
-- 
2.31.1.189.g2e36527f23
Re: (subset) [PATCH rcu 0/27] Unconditionally enable SRCU
Posted by Jens Axboe 2 years, 8 months ago
On Wed, 04 Jan 2023 16:37:59 -0800, Paul E. McKenney wrote:
> This series removes Kconfig "select" clauses and #ifdef directives that
> are no longer necessary give that SRCU is now unconditionally enabled,
> courtesy of new-age printk() requirements.  Finally, the SRCU Kconfig
> option is removed entirely.
> 
> 1.	arch/x86: Remove "select SRCU".
> 
> [...]

Applied, thanks!

[07/27] block: Remove "select SRCU"
        commit: b2b50d572135c5c6e10c2ff79cd828d5a8141ef6

Best regards,
-- 
Jens Axboe
Re: (subset) [PATCH rcu 0/27] Unconditionally enable SRCU
Posted by Paul E. McKenney 2 years, 8 months ago
On Thu, Jan 05, 2023 at 08:50:37AM -0700, Jens Axboe wrote:
> 
> On Wed, 04 Jan 2023 16:37:59 -0800, Paul E. McKenney wrote:
> > This series removes Kconfig "select" clauses and #ifdef directives that
> > are no longer necessary give that SRCU is now unconditionally enabled,
> > courtesy of new-age printk() requirements.  Finally, the SRCU Kconfig
> > option is removed entirely.
> > 
> > 1.	arch/x86: Remove "select SRCU".
> > 
> > [...]
> 
> Applied, thanks!
> 
> [07/27] block: Remove "select SRCU"
>         commit: b2b50d572135c5c6e10c2ff79cd828d5a8141ef6

Thank you, Jens!  I will drop this one on my next rebase.

							Thanx, Paul