Re: [PATCH] rcu: remove unnecessary check cpu_no_qs.norm on rcu_report_qs_rdp

From: Yun Levi
Date: Mon Jul 24 2023 - 05:00:42 EST


Hi, Z qiang.

> Maybe this "start new gp" note misunderstood you.
> For built with CONFIG_RCU_STRICT_GRACE_PERIOD=y and CONFIG_PREEMPT=n kernels,
> if the gp kthread start a new GP before we exit the RCU read critical section,
> and just before we call rcu_report_qs_rdp() in
> rcu_read_unlock_strict(), at this time if the clock irq
> happens and find that the "rcu_seq_current(&rnp->gp_seq) !=
> rdp->gp_seq" is true in rcu_pening(),
> will trigger RCU softirq and find that the rcu_seq_new_gp(rdp->gp_seq,
> rnp->gp_seq) is true,
> will set rdp->cpu_no_qs.b.norm is true. when we return from the
> softirq and call rcu_report_qs_rdp()
> in rcu_read_unlock_strict(), find that the rdp->cpu_no_qs.b.norm is true.
> so there is a situation where the rdp->cpu_no_qs.b.norm is true.

Thanks for making me out from my misunderstanding..!
and even the not in STRICT_GRACE_PERIOD,
old grace period's qs could be reported though rcu_gp_kthread start new gp
by first rcu_report_qs_rdp, will be clear soon by continuous rcu_report_qs_rdp
which is triggered by interrupting before the first rcu_report_qs_rdp.

Many thanks..!

And sorry to make noise...!