* [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis
@ 2025-01-08 19:24 David Reaver
2025-01-08 20:01 ` Paul E. McKenney
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: David Reaver @ 2025-01-08 19:24 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
Paul E . McKenney
Cc: David Reaver, rcu, linux-kernel, Krister Johansen
The deprecated_apis map was created in [1] so checkpatch would flag
deprecated RCU APIs. These deprecated APIs have since been removed from the
kernel. This patch removes them from this map so checkpatch doesn't waste
time looking for them, and so readers of checkpatch looking for deprecated
APIs don't waste time searching for them.
Link: https://lore.kernel.org/all/20181111192904.3199-13-paulmck@linux.ibm.com/ [1]
Signed-off-by: David Reaver <me@davidreaver.com>
---
scripts/checkpatch.pl | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9eed3683ad76..842a39a01af1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -834,1 +834,1 @@ foreach my $entry (@mode_permission_funcs) {
$mode_perms_search = "(?:${mode_perms_search})";
our %deprecated_apis = (
- "synchronize_rcu_bh" => "synchronize_rcu",
- "synchronize_rcu_bh_expedited" => "synchronize_rcu_expedited",
- "call_rcu_bh" => "call_rcu",
- "rcu_barrier_bh" => "rcu_barrier",
- "synchronize_sched" => "synchronize_rcu",
- "synchronize_sched_expedited" => "synchronize_rcu_expedited",
- "call_rcu_sched" => "call_rcu",
- "rcu_barrier_sched" => "rcu_barrier",
- "get_state_synchronize_sched" => "get_state_synchronize_rcu",
- "cond_synchronize_sched" => "cond_synchronize_rcu",
"kmap" => "kmap_local_page",
"kunmap" => "kunmap_local",
"kmap_atomic" => "kmap_local_page",
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis 2025-01-08 19:24 [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis David Reaver @ 2025-01-08 20:01 ` Paul E. McKenney 2025-01-09 0:48 ` Kuan-Wei Chiu 2025-01-09 15:56 ` Joe Perches 2 siblings, 0 replies; 5+ messages in thread From: Paul E. McKenney @ 2025-01-08 20:01 UTC (permalink / raw) To: David Reaver Cc: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn, rcu, linux-kernel, Krister Johansen On Wed, Jan 08, 2025 at 11:24:54AM -0800, David Reaver wrote: > The deprecated_apis map was created in [1] so checkpatch would flag > deprecated RCU APIs. These deprecated APIs have since been removed from the > kernel. This patch removes them from this map so checkpatch doesn't waste > time looking for them, and so readers of checkpatch looking for deprecated > APIs don't waste time searching for them. > > Link: https://lore.kernel.org/all/20181111192904.3199-13-paulmck@linux.ibm.com/ [1] > > Signed-off-by: David Reaver <me@davidreaver.com> I guess it has been more than five years now. ;-) Reviewed-by: Paul E. McKenney <paulmck@kernel.org> > --- > scripts/checkpatch.pl | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 9eed3683ad76..842a39a01af1 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -834,1 +834,1 @@ foreach my $entry (@mode_permission_funcs) { > $mode_perms_search = "(?:${mode_perms_search})"; > > our %deprecated_apis = ( > - "synchronize_rcu_bh" => "synchronize_rcu", > - "synchronize_rcu_bh_expedited" => "synchronize_rcu_expedited", > - "call_rcu_bh" => "call_rcu", > - "rcu_barrier_bh" => "rcu_barrier", > - "synchronize_sched" => "synchronize_rcu", > - "synchronize_sched_expedited" => "synchronize_rcu_expedited", > - "call_rcu_sched" => "call_rcu", > - "rcu_barrier_sched" => "rcu_barrier", > - "get_state_synchronize_sched" => "get_state_synchronize_rcu", > - "cond_synchronize_sched" => "cond_synchronize_rcu", > "kmap" => "kmap_local_page", > "kunmap" => "kunmap_local", > "kmap_atomic" => "kmap_local_page", > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis 2025-01-08 19:24 [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis David Reaver 2025-01-08 20:01 ` Paul E. McKenney @ 2025-01-09 0:48 ` Kuan-Wei Chiu 2025-01-09 15:56 ` Joe Perches 2 siblings, 0 replies; 5+ messages in thread From: Kuan-Wei Chiu @ 2025-01-09 0:48 UTC (permalink / raw) To: David Reaver Cc: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn, Paul E . McKenney, rcu, linux-kernel, Krister Johansen On Wed, Jan 08, 2025 at 11:24:54AM -0800, David Reaver wrote: > The deprecated_apis map was created in [1] so checkpatch would flag > deprecated RCU APIs. These deprecated APIs have since been removed from the > kernel. This patch removes them from this map so checkpatch doesn't waste > time looking for them, and so readers of checkpatch looking for deprecated > APIs don't waste time searching for them. > > Link: https://lore.kernel.org/all/20181111192904.3199-13-paulmck@linux.ibm.com/ [1] > > Signed-off-by: David Reaver <me@davidreaver.com> LGTM. Thanks! Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com> Regards, Kuan-Wei ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis 2025-01-08 19:24 [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis David Reaver 2025-01-08 20:01 ` Paul E. McKenney 2025-01-09 0:48 ` Kuan-Wei Chiu @ 2025-01-09 15:56 ` Joe Perches 2025-01-09 17:00 ` Paul E. McKenney 2 siblings, 1 reply; 5+ messages in thread From: Joe Perches @ 2025-01-09 15:56 UTC (permalink / raw) To: David Reaver, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn, Paul E . McKenney, Andrew Morton Cc: rcu, linux-kernel, Krister Johansen On Wed, 2025-01-08 at 11:24 -0800, David Reaver wrote: > The deprecated_apis map was created in [1] so checkpatch would flag > deprecated RCU APIs. These deprecated APIs have since been removed from the > kernel. This patch removes them from this map so checkpatch doesn't waste > time looking for them, and so readers of checkpatch looking for deprecated > APIs don't waste time searching for them. Acked-by: Joe Perches <joe@perches.com> Maybe remove the references from rcupdateup.h one day too. > > Link: https://lore.kernel.org/all/20181111192904.3199-13-paulmck@linux.ibm.com/ [1] > > Signed-off-by: David Reaver <me@davidreaver.com> > --- > scripts/checkpatch.pl | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 9eed3683ad76..842a39a01af1 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -834,1 +834,1 @@ foreach my $entry (@mode_permission_funcs) { > $mode_perms_search = "(?:${mode_perms_search})"; > > our %deprecated_apis = ( > - "synchronize_rcu_bh" => "synchronize_rcu", > - "synchronize_rcu_bh_expedited" => "synchronize_rcu_expedited", > - "call_rcu_bh" => "call_rcu", > - "rcu_barrier_bh" => "rcu_barrier", > - "synchronize_sched" => "synchronize_rcu", > - "synchronize_sched_expedited" => "synchronize_rcu_expedited", > - "call_rcu_sched" => "call_rcu", > - "rcu_barrier_sched" => "rcu_barrier", > - "get_state_synchronize_sched" => "get_state_synchronize_rcu", > - "cond_synchronize_sched" => "cond_synchronize_rcu", > "kmap" => "kmap_local_page", > "kunmap" => "kunmap_local", > "kmap_atomic" => "kmap_local_page", ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis 2025-01-09 15:56 ` Joe Perches @ 2025-01-09 17:00 ` Paul E. McKenney 0 siblings, 0 replies; 5+ messages in thread From: Paul E. McKenney @ 2025-01-09 17:00 UTC (permalink / raw) To: Joe Perches Cc: David Reaver, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn, Andrew Morton, rcu, linux-kernel, Krister Johansen On Thu, Jan 09, 2025 at 07:56:51AM -0800, Joe Perches wrote: > On Wed, 2025-01-08 at 11:24 -0800, David Reaver wrote: > > The deprecated_apis map was created in [1] so checkpatch would flag > > deprecated RCU APIs. These deprecated APIs have since been removed from the > > kernel. This patch removes them from this map so checkpatch doesn't waste > > time looking for them, and so readers of checkpatch looking for deprecated > > APIs don't waste time searching for them. > > Acked-by: Joe Perches <joe@perches.com> > > Maybe remove the references from rcupdateup.h one day too. Good point, please see below. Some instances remain in Documentation/RCU/RTFP.txt, but these are needed to record the history. Thanx, Paul ------------------------------------------------------------------------ commit a8280286a6425f26785aeedfe9b209a65ca1d6fd Author: Paul E. McKenney <paulmck@kernel.org> Date: Thu Jan 9 08:52:15 2025 -0800 rcu: Remove references to old grace-period-wait primitives The rcu_barrier_sched(), synchronize_sched(), and synchronize_rcu_bh() RCU API members have been gone for many years. This commit therefore removes non-historical instances of them. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> diff --git a/Documentation/RCU/rcubarrier.rst b/Documentation/RCU/rcubarrier.rst index 6da7f66da2a80..12a7b059654f7 100644 --- a/Documentation/RCU/rcubarrier.rst +++ b/Documentation/RCU/rcubarrier.rst @@ -329,10 +329,7 @@ Answer: was first added back in 2005. This is because on_each_cpu() disables preemption, which acted as an RCU read-side critical section, thus preventing CPU 0's grace period from completing - until on_each_cpu() had dealt with all of the CPUs. However, - with the advent of preemptible RCU, rcu_barrier() no longer - waited on nonpreemptible regions of code in preemptible kernels, - that being the job of the new rcu_barrier_sched() function. + until on_each_cpu() had dealt with all of the CPUs. However, with the RCU flavor consolidation around v4.20, this possibility was once again ruled out, because the consolidated diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 6672e55deeaa4..9b05db8ff0619 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -800,11 +800,9 @@ do { \ * sections, invocation of the corresponding RCU callback is deferred * until after the all the other CPUs exit their critical sections. * - * In v5.0 and later kernels, synchronize_rcu() and call_rcu() also - * wait for regions of code with preemption disabled, including regions of - * code with interrupts or softirqs disabled. In pre-v5.0 kernels, which - * define synchronize_sched(), only code enclosed within rcu_read_lock() - * and rcu_read_unlock() are guaranteed to be waited for. + * Both synchronize_rcu() and call_rcu() also wait for regions of code + * with preemption disabled, including regions of code with interrupts or + * softirqs disabled. * * Note, however, that RCU callbacks are permitted to run concurrently * with new RCU read-side critical sections. One way that this can happen @@ -859,11 +857,10 @@ static __always_inline void rcu_read_lock(void) * rcu_read_unlock() - marks the end of an RCU read-side critical section. * * In almost all situations, rcu_read_unlock() is immune from deadlock. - * In recent kernels that have consolidated synchronize_sched() and - * synchronize_rcu_bh() into synchronize_rcu(), this deadlock immunity - * also extends to the scheduler's runqueue and priority-inheritance - * spinlocks, courtesy of the quiescent-state deferral that is carried - * out when rcu_read_unlock() is invoked with interrupts disabled. + * This deadlock immunity also extends to the scheduler's runqueue + * and priority-inheritance spinlocks, courtesy of the quiescent-state + * deferral that is carried out when rcu_read_unlock() is invoked with + * interrupts disabled. * * See rcu_read_lock() for more information. */ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-09 17:00 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-01-08 19:24 [PATCH] checkpatch: Remove migrated RCU APIs from deprecated_apis David Reaver 2025-01-08 20:01 ` Paul E. McKenney 2025-01-09 0:48 ` Kuan-Wei Chiu 2025-01-09 15:56 ` Joe Perches 2025-01-09 17:00 ` Paul E. McKenney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®