lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/11] rcu: Kill rnp->ofl_seq and use only rcu_state.ofl_lock for exclusion
From
Date
On Fri, 2021-12-10 at 00:01 +0530, Neeraj Upadhyay wrote:
> > @@ -4246,11 +4249,11 @@ void rcu_cpu_starting(unsigned int cpu)
> >
> > rnp = rdp->mynode;
> > mask = rdp->grpmask;
> > - WRITE_ONCE(rnp->ofl_seq, rnp->ofl_seq + 1);
> > - WARN_ON_ONCE(!(rnp->ofl_seq & 0x1));
> > + local_irq_save(seq_flags);
> > + arch_spin_lock(&rcu_state.ofl_lock);
> > rcu_dynticks_eqs_online();
> > smp_mb(); // Pair with rcu_gp_cleanup()'s ->ofl_seq barrier().
>
> Can we drop this smp_mb(),as arch_spin_lock(&rcu_state.ofl_lock)
> provides the ordering now?

Yes, thanks.

> > - raw_spin_lock_irqsave_rcu_node(rnp, flags);
> > + raw_spin_lock_rcu_node(rnp);
> > WRITE_ONCE(rnp->qsmaskinitnext, rnp->qsmaskinitnext | mask);
> > newcpu = !(rnp->expmaskinitnext & mask);
> > rnp->expmaskinitnext |= mask;
> > @@ -4269,9 +4272,8 @@ void rcu_cpu_starting(unsigned int cpu)
> > } else {
> > raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
>
> 'flags' is uninitialized now?

Ah yes, that suffered from the fact that saving the flags is pointless
because we know we already disabled interrupts... but
rcu_report_qs_rnp() *really* wants to be given some flags to restore.

Will fix that too; thanks again.
[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2021-12-09 19:45    [W:0.202 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site