Here are some RCU fixes and cleanups. The main one is the TREE07 stuttering fix
which makes the test pass now. I am continuing to test these but I am sending
it out for review in advance. Thanks.
Joel Fernandes (Google) (5):
rcutorture: Fix stuttering races and other issues
srcu: Fix error handling in init_srcu_struct_fields()
tree/nocb: Adjust RCU_NOCB_WAKE_* macros from weaker to stronger
tree/nocb: Improve readability of nocb_gp_wait()
Revert "checkpatch: Error out if deprecated RCU API used"
kernel/rcu/srcutree.c | 31 ++++++-----
kernel/rcu/tree.h | 4 +-
kernel/rcu/tree_nocb.h | 113 ++++++++++++++++++++++++-----------------
kernel/torture.c | 46 +++++------------
scripts/checkpatch.pl | 9 ----
5 files changed, 98 insertions(+), 105 deletions(-)
--
2.41.0.487.g6d72f3e995-goog
The check for single-argument kfree_rcu() is no longer needed as all
users have been converted.
This reverts commit 1eacac3255495be7502d406e2ba5444fb5c3607c.
Signed-off-by: Joel Fernandes (Google) <[email protected]>
---
scripts/checkpatch.pl | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a9841148cde2..528f619520eb 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6422,15 +6422,6 @@ sub process {
}
}
-# check for soon-to-be-deprecated single-argument k[v]free_rcu() API
- if ($line =~ /\bk[v]?free_rcu\s*\([^(]+\)/) {
- if ($line =~ /\bk[v]?free_rcu\s*\([^,]+\)/) {
- ERROR("DEPRECATED_API",
- "Single-argument k[v]free_rcu() API is deprecated, please pass rcu_head object or call k[v]free_rcu_mightsleep()." . $herecurr);
- }
- }
-
-
# check for unnecessary "Out of Memory" messages
if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
$prevline =~ /^[ \+]\s*if\s*\(\s*(\!\s*|NULL\s*==\s*)?($Lval)(\s*==\s*NULL\s*)?\s*\)/ &&
--
2.41.0.487.g6d72f3e995-goog
On Tue, Jul 25, 2023 at 11:29:10PM +0000, Joel Fernandes (Google) wrote:
> The check for single-argument kfree_rcu() is no longer needed as all
> users have been converted.
>
> This reverts commit 1eacac3255495be7502d406e2ba5444fb5c3607c.
>
> Signed-off-by: Joel Fernandes (Google) <[email protected]>
Good eyes, thank you!
I applied this with an updated commit log as shown below. Please let
me know if I messed something up.
Thanx, Paul
------------------------------------------------------------------------
commit 1f5f0053f7662385d9ead46d4c0d2d4fe9aaa73a
Author: Joel Fernandes (Google) <[email protected]>
Date: Tue Jul 25 23:29:10 2023 +0000
Revert "checkpatch: Error out if deprecated RCU API used"
The definition for single-argument kfree_rcu() has been removed,
so that any further attempt to use it will result in a build error.
Because of this build error, there is no longer any need for a special
check in checkpatch.pl.
Therefore, revert commit 1eacac3255495be7502d406e2ba5444fb5c3607c.
Signed-off-by: Joel Fernandes (Google) <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a9841148cde2..528f619520eb 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6422,15 +6422,6 @@ sub process {
}
}
-# check for soon-to-be-deprecated single-argument k[v]free_rcu() API
- if ($line =~ /\bk[v]?free_rcu\s*\([^(]+\)/) {
- if ($line =~ /\bk[v]?free_rcu\s*\([^,]+\)/) {
- ERROR("DEPRECATED_API",
- "Single-argument k[v]free_rcu() API is deprecated, please pass rcu_head object or call k[v]free_rcu_mightsleep()." . $herecurr);
- }
- }
-
-
# check for unnecessary "Out of Memory" messages
if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
$prevline =~ /^[ \+]\s*if\s*\(\s*(\!\s*|NULL\s*==\s*)?($Lval)(\s*==\s*NULL\s*)?\s*\)/ &&
On Wed, Jul 26, 2023 at 5:12 PM Paul E. McKenney <[email protected]> wrote:
>
> On Tue, Jul 25, 2023 at 11:29:10PM +0000, Joel Fernandes (Google) wrote:
> > The check for single-argument kfree_rcu() is no longer needed as all
> > users have been converted.
> >
> > This reverts commit 1eacac3255495be7502d406e2ba5444fb5c3607c.
> >
> > Signed-off-by: Joel Fernandes (Google) <[email protected]>
>
> Good eyes, thank you!
>
> I applied this with an updated commit log as shown below. Please let
> me know if I messed something up.
LGTM. Thank you!
- Joel
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> commit 1f5f0053f7662385d9ead46d4c0d2d4fe9aaa73a
> Author: Joel Fernandes (Google) <[email protected]>
> Date: Tue Jul 25 23:29:10 2023 +0000
>
> Revert "checkpatch: Error out if deprecated RCU API used"
>
> The definition for single-argument kfree_rcu() has been removed,
> so that any further attempt to use it will result in a build error.
> Because of this build error, there is no longer any need for a special
> check in checkpatch.pl.
>
> Therefore, revert commit 1eacac3255495be7502d406e2ba5444fb5c3607c.
>
> Signed-off-by: Joel Fernandes (Google) <[email protected]>
> Signed-off-by: Paul E. McKenney <[email protected]>
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a9841148cde2..528f619520eb 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -6422,15 +6422,6 @@ sub process {
> }
> }
>
> -# check for soon-to-be-deprecated single-argument k[v]free_rcu() API
> - if ($line =~ /\bk[v]?free_rcu\s*\([^(]+\)/) {
> - if ($line =~ /\bk[v]?free_rcu\s*\([^,]+\)/) {
> - ERROR("DEPRECATED_API",
> - "Single-argument k[v]free_rcu() API is deprecated, please pass rcu_head object or call k[v]free_rcu_mightsleep()." . $herecurr);
> - }
> - }
> -
> -
> # check for unnecessary "Out of Memory" messages
> if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
> $prevline =~ /^[ \+]\s*if\s*\(\s*(\!\s*|NULL\s*==\s*)?($Lval)(\s*==\s*NULL\s*)?\s*\)/ &&
On Sat, Jul 29, 2023 at 10:27 AM Joel Fernandes (Google)
<[email protected]> wrote:
>
> The check for single-argument kfree_rcu() is no longer needed as all
> users have been converted.
>
> This reverts commit 1eacac3255495be7502d406e2ba5444fb5c3607c.
>
> Signed-off-by: Joel Fernandes (Google) <[email protected]>
> ---
Ignore this particular patch since it was already applied, sorry for
resend. Thank you!
- Joel
> scripts/checkpatch.pl | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index a9841148cde2..528f619520eb 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -6422,15 +6422,6 @@ sub process {
> }
> }
>
> -# check for soon-to-be-deprecated single-argument k[v]free_rcu() API
> - if ($line =~ /\bk[v]?free_rcu\s*\([^(]+\)/) {
> - if ($line =~ /\bk[v]?free_rcu\s*\([^,]+\)/) {
> - ERROR("DEPRECATED_API",
> - "Single-argument k[v]free_rcu() API is deprecated, please pass rcu_head object or call k[v]free_rcu_mightsleep()." . $herecurr);
> - }
> - }
> -
> -
> # check for unnecessary "Out of Memory" messages
> if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
> $prevline =~ /^[ \+]\s*if\s*\(\s*(\!\s*|NULL\s*==\s*)?($Lval)(\s*==\s*NULL\s*)?\s*\)/ &&
> --
> 2.41.0.487.g6d72f3e995-goog
>