* [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables
@ 2026-07-06 10:03 Zqiang
2026-07-06 10:03 ` [PATCH] rcu-tasks: Dump rcu tasks status when the boot-test failed Zqiang
2026-07-06 18:44 ` [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables Paul E. McKenney
0 siblings, 2 replies; 3+ messages in thread
From: Zqiang @ 2026-07-06 10:03 UTC (permalink / raw)
To: paulmck, frederic, neeraj.upadhyay, joelagnelf, urezki, boqun
Cc: qiang.zhang, rcu, linux-kernel
The RCU tasks trace has been reimplemented by 'commit c27cea4416a3
("rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast")', the
rcu_tasks structure's->n_ipis_fails is no longer used, this commit
therefore remove it.
Signed-off-by: Zqiang <qiang.zhang@linux.dev>
---
kernel/rcu/tasks.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index f4da5fad70f5..7f7d1e636217 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -67,7 +67,6 @@ struct rcu_tasks_percpu {
* @gp_start: Most recent grace-period start in jiffies.
* @tasks_gp_seq: Number of grace periods completed since boot in upper bits.
* @n_ipis: Number of IPIs sent to encourage grace periods to end.
- * @n_ipis_fails: Number of IPI-send failures.
* @kthread_ptr: This flavor's grace-period/callback-invocation kthread.
* @lazy_jiffies: Number of jiffies to allow callbacks to be lazy.
* @pregp_func: This flavor's pre-grace-period function (optional).
@@ -102,7 +101,6 @@ struct rcu_tasks {
unsigned long gp_start;
unsigned long tasks_gp_seq;
unsigned long n_ipis;
- unsigned long n_ipis_fails;
struct task_struct *kthread_ptr;
unsigned long lazy_jiffies;
rcu_tasks_gp_func_t gp_func;
@@ -735,12 +733,12 @@ static void show_rcu_tasks_generic_gp_kthread(struct rcu_tasks *rtp, char *s)
if (havecbs && haveurgent && haveurgentcbs)
break;
}
- pr_info("%s: %s(%d) since %lu g:%lu i:%lu/%lu %c%c%c%c l:%lu %s\n",
+ pr_info("%s: %s(%d) since %lu g:%lu i:%lu %c%c%c%c l:%lu %s\n",
rtp->kname,
tasks_gp_state_getname(rtp), data_race(rtp->gp_state),
jiffies - data_race(rtp->gp_jiffies),
data_race(rcu_seq_current(&rtp->tasks_gp_seq)),
- data_race(rtp->n_ipis_fails), data_race(rtp->n_ipis),
+ data_race(rtp->n_ipis),
".k"[!!data_race(rtp->kthread_ptr)],
".C"[havecbs],
".u"[haveurgent],
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] rcu-tasks: Dump rcu tasks status when the boot-test failed
2026-07-06 10:03 [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables Zqiang
@ 2026-07-06 10:03 ` Zqiang
2026-07-06 18:44 ` [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables Paul E. McKenney
1 sibling, 0 replies; 3+ messages in thread
From: Zqiang @ 2026-07-06 10:03 UTC (permalink / raw)
To: paulmck, frederic, neeraj.upadhyay, joelagnelf, urezki, boqun
Cc: qiang.zhang, rcu, linux-kernel
This commit adds a dump RCU task status function to rcu tasks tests,
used to obtain more information to help debug when the RCU tasks
boot-time tests failed.
Signed-off-by: Zqiang <qiang.zhang@linux.dev>
---
syzbot reported the RCU tasks boot-time test failed:
https://syzkaller.appspot.com/bug?extid=251e9abcdac140e7ec74
kernel/rcu/tasks.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index 7f7d1e636217..d9e1e53f4ccf 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -1453,6 +1453,7 @@ struct rcu_tasks_test_desc {
const char *name;
bool notrun;
unsigned long runstart;
+ void (*gp_dbg)(void);
};
static struct rcu_tasks_test_desc tests[] = {
@@ -1460,6 +1461,8 @@ static struct rcu_tasks_test_desc tests[] = {
.name = "call_rcu_tasks()",
/* If not defined, the test is skipped. */
.notrun = IS_ENABLED(CONFIG_TASKS_RCU),
+ /* Dump rcu tasks status, if test failed. */
+ .gp_dbg = show_rcu_tasks_classic_gp_kthread
},
{
.name = "call_rcu_tasks_trace()",
@@ -1519,6 +1522,8 @@ static int rcu_tasks_verify_self_tests(void)
while (tests[i].notrun) { // still hanging.
if (time_after(jiffies, tests[i].runstart + bst)) {
pr_err("%s has failed boot-time tests.\n", tests[i].name);
+ if (tests[i].gp_dbg)
+ tests[i].gp_dbg();
ret = -1;
break;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables
2026-07-06 10:03 [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables Zqiang
2026-07-06 10:03 ` [PATCH] rcu-tasks: Dump rcu tasks status when the boot-test failed Zqiang
@ 2026-07-06 18:44 ` Paul E. McKenney
1 sibling, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2026-07-06 18:44 UTC (permalink / raw)
To: Zqiang
Cc: frederic, neeraj.upadhyay, joelagnelf, urezki, boqun, rcu,
linux-kernel
On Mon, Jul 06, 2026 at 06:03:09PM +0800, Zqiang wrote:
> The RCU tasks trace has been reimplemented by 'commit c27cea4416a3
> ("rcu: Re-implement RCU Tasks Trace in terms of SRCU-fast")', the
> rcu_tasks structure's->n_ipis_fails is no longer used, this commit
> therefore remove it.
>
> Signed-off-by: Zqiang <qiang.zhang@linux.dev>
I have queued both for review and testing, thank you!
This patch produced the expected result in my initial tests. However,
for the second patch, I used this command to force a stall:
tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 15 --configs "TASKS01 TASKS02 TASKS03 RUDE01" --bootargs "rcutorture.stall_cpu=660" --trust-make
Except I got vanilla RCU CPU stall warnings, but not RCU Tasks nor
RCU Tasks Rude stall warnings. And not even the "grace period number"
pre-stall message. Probably because I am forgetting something. But what
did you do to test your change?
Thanx, Paul
> ---
> kernel/rcu/tasks.h | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
> index f4da5fad70f5..7f7d1e636217 100644
> --- a/kernel/rcu/tasks.h
> +++ b/kernel/rcu/tasks.h
> @@ -67,7 +67,6 @@ struct rcu_tasks_percpu {
> * @gp_start: Most recent grace-period start in jiffies.
> * @tasks_gp_seq: Number of grace periods completed since boot in upper bits.
> * @n_ipis: Number of IPIs sent to encourage grace periods to end.
> - * @n_ipis_fails: Number of IPI-send failures.
> * @kthread_ptr: This flavor's grace-period/callback-invocation kthread.
> * @lazy_jiffies: Number of jiffies to allow callbacks to be lazy.
> * @pregp_func: This flavor's pre-grace-period function (optional).
> @@ -102,7 +101,6 @@ struct rcu_tasks {
> unsigned long gp_start;
> unsigned long tasks_gp_seq;
> unsigned long n_ipis;
> - unsigned long n_ipis_fails;
> struct task_struct *kthread_ptr;
> unsigned long lazy_jiffies;
> rcu_tasks_gp_func_t gp_func;
> @@ -735,12 +733,12 @@ static void show_rcu_tasks_generic_gp_kthread(struct rcu_tasks *rtp, char *s)
> if (havecbs && haveurgent && haveurgentcbs)
> break;
> }
> - pr_info("%s: %s(%d) since %lu g:%lu i:%lu/%lu %c%c%c%c l:%lu %s\n",
> + pr_info("%s: %s(%d) since %lu g:%lu i:%lu %c%c%c%c l:%lu %s\n",
> rtp->kname,
> tasks_gp_state_getname(rtp), data_race(rtp->gp_state),
> jiffies - data_race(rtp->gp_jiffies),
> data_race(rcu_seq_current(&rtp->tasks_gp_seq)),
> - data_race(rtp->n_ipis_fails), data_race(rtp->n_ipis),
> + data_race(rtp->n_ipis),
> ".k"[!!data_race(rtp->kthread_ptr)],
> ".C"[havecbs],
> ".u"[haveurgent],
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-06 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 10:03 [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables Zqiang
2026-07-06 10:03 ` [PATCH] rcu-tasks: Dump rcu tasks status when the boot-test failed Zqiang
2026-07-06 18:44 ` [PATCH] rcu-tasks: Remove unused struct rcu_tasks's->n_ipis_fails variables 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