diff mbox series

[27/27] rcu: Remove CONFIG_SRCU

Message ID 20230105003813.1770367-27-paulmck@kernel.org (mailing list archive)
State Accepted
Commit f7e97b2244999f887a1a81058fdd12976e7ab622
Headers show
Series Unconditionally enable SRCU | expand

Commit Message

Paul E. McKenney Jan. 5, 2023, 12:38 a.m. UTC
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>
---
 kernel/rcu/Kconfig                                          | 3 ---
 tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 4 ----
 2 files changed, 7 deletions(-)

Comments

John Ogness Jan. 5, 2023, 8:04 a.m. UTC | #1
On 2023-01-04, "Paul E. McKenney" <paulmck@kernel.org> wrote:
> Now that all references to CONFIG_SRCU have been removed, it is time to
> remove CONFIG_SRCU itself.

I think "all references" is a bit misleading since there still are
several places in the kernel code that use it:

$ git grep CONFIG_SRCU
drivers/base/core.c:#ifdef CONFIG_SRCU
drivers/base/core.c:#else /* !CONFIG_SRCU */
drivers/base/core.c:#endif /* !CONFIG_SRCU */
fs/locks.c:#if IS_ENABLED(CONFIG_SRCU)
fs/locks.c:#else /* !IS_ENABLED(CONFIG_SRCU) */
fs/locks.c:#endif /* IS_ENABLED(CONFIG_SRCU) */
kernel/notifier.c:#ifdef CONFIG_SRCU
kernel/notifier.c:#endif /* CONFIG_SRCU */

Should those be removed before this patch?

John Ogness
Paul E. McKenney Jan. 5, 2023, 3:23 p.m. UTC | #2
On Thu, Jan 05, 2023 at 09:10:16AM +0106, John Ogness wrote:
> On 2023-01-04, "Paul E. McKenney" <paulmck@kernel.org> wrote:
> > Now that all references to CONFIG_SRCU have been removed, it is time to
> > remove CONFIG_SRCU itself.
> 
> I think "all references" is a bit misleading since there still are
> several places in the kernel code that use it:
> 
> $ git grep CONFIG_SRCU
> drivers/base/core.c:#ifdef CONFIG_SRCU
> drivers/base/core.c:#else /* !CONFIG_SRCU */
> drivers/base/core.c:#endif /* !CONFIG_SRCU */
> fs/locks.c:#if IS_ENABLED(CONFIG_SRCU)
> fs/locks.c:#else /* !IS_ENABLED(CONFIG_SRCU) */
> fs/locks.c:#endif /* IS_ENABLED(CONFIG_SRCU) */
> kernel/notifier.c:#ifdef CONFIG_SRCU
> kernel/notifier.c:#endif /* CONFIG_SRCU */

In the -rcu tree, these are removed by these commits:

1798c5b6b0ea ("drivers/base: Remove CONFIG_SRCU")
19aa50512372 ("fs: Remove CONFIG_SRCU")
fe0c9bd625ad ("kernel/notifier: Remove CONFIG_SRCU")

> Should those be removed before this patch?

When I merge the -rcu tree's "dev" branch with current mainline, "git
grep CONFIG_SRCU" gives me no output.  Am I fat-fingering something here?

							Thanx, Paul
John Ogness Jan. 5, 2023, 3:52 p.m. UTC | #3
On 2023-01-05, "Paul E. McKenney" <paulmck@kernel.org> wrote:
>> $ git grep CONFIG_SRCU
>> drivers/base/core.c:#ifdef CONFIG_SRCU
>> drivers/base/core.c:#else /* !CONFIG_SRCU */
>> drivers/base/core.c:#endif /* !CONFIG_SRCU */
>> fs/locks.c:#if IS_ENABLED(CONFIG_SRCU)
>> fs/locks.c:#else /* !IS_ENABLED(CONFIG_SRCU) */
>> fs/locks.c:#endif /* IS_ENABLED(CONFIG_SRCU) */
>> kernel/notifier.c:#ifdef CONFIG_SRCU
>> kernel/notifier.c:#endif /* CONFIG_SRCU */
>
> In the -rcu tree, these are removed by these commits:
>
> 1798c5b6b0ea ("drivers/base: Remove CONFIG_SRCU")
> 19aa50512372 ("fs: Remove CONFIG_SRCU")
> fe0c9bd625ad ("kernel/notifier: Remove CONFIG_SRCU")
>
>> Should those be removed before this patch?
>
> When I merge the -rcu tree's "dev" branch with current mainline, "git
> grep CONFIG_SRCU" gives me no output.  Am I fat-fingering something
> here?

Sorry, I checked against the wrong branch. You are good.

Reviewed-by: John Ogness <john.ogness@linutronix.de>
Paul E. McKenney Jan. 5, 2023, 4:04 p.m. UTC | #4
On Thu, Jan 05, 2023 at 04:58:40PM +0106, John Ogness wrote:
> On 2023-01-05, "Paul E. McKenney" <paulmck@kernel.org> wrote:
> >> $ git grep CONFIG_SRCU
> >> drivers/base/core.c:#ifdef CONFIG_SRCU
> >> drivers/base/core.c:#else /* !CONFIG_SRCU */
> >> drivers/base/core.c:#endif /* !CONFIG_SRCU */
> >> fs/locks.c:#if IS_ENABLED(CONFIG_SRCU)
> >> fs/locks.c:#else /* !IS_ENABLED(CONFIG_SRCU) */
> >> fs/locks.c:#endif /* IS_ENABLED(CONFIG_SRCU) */
> >> kernel/notifier.c:#ifdef CONFIG_SRCU
> >> kernel/notifier.c:#endif /* CONFIG_SRCU */
> >
> > In the -rcu tree, these are removed by these commits:
> >
> > 1798c5b6b0ea ("drivers/base: Remove CONFIG_SRCU")
> > 19aa50512372 ("fs: Remove CONFIG_SRCU")
> > fe0c9bd625ad ("kernel/notifier: Remove CONFIG_SRCU")
> >
> >> Should those be removed before this patch?
> >
> > When I merge the -rcu tree's "dev" branch with current mainline, "git
> > grep CONFIG_SRCU" gives me no output.  Am I fat-fingering something
> > here?
> 
> Sorry, I checked against the wrong branch. You are good.
> 
> Reviewed-by: John Ogness <john.ogness@linutronix.de>

Thank you, and I will apply this on the next rebase.

							Thanx, Paul
diff mbox series

Patch

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