WARNING: suspicious RCU usage
Paul E. McKenney
paulmck at linux.vnet.ibm.com
Tue Dec 12 09:21:22 PST 2017
On Tue, Dec 12, 2017 at 02:56:18PM -0200, Fabio Estevam wrote:
> Hi Paul,
>
> On Tue, Dec 12, 2017 at 2:49 PM, Paul E. McKenney
> <paulmck at linux.vnet.ibm.com> wrote:
>
> > On the perhaps unlikely off-chance that it is both useful and welcome,
> > the (untested, probably does not even build) patch below illustrates the
> > use of smp_call_function_single(). This is based on the patch Russell
> > sent -- for all I know, it might well be that there are other places
> > needing similar changes.
> >
> > But something to try out for anyone wishing to do so.
> >
> > Thanx, Paul
> >
> > ------------------------------------------------------------------------
> >
> > commit c579a1494ccbc7ebf5548115571a2988ea1a1fe5
> > Author: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
> > Date: Mon Dec 11 09:40:58 2017 -0800
> >
> > ARM: CPU hotplug: Delegate complete() to surviving CPU
> >
> > The ARM implementation of arch_cpu_idle_dead() invokes complete(), but
> > does so after RCU has stopped watching the outgoing CPU, which results
> > in lockdep complaints because complete() invokes functions containing RCU
> > readers. This patch therefore uses Thomas Gleixner's trick of delegating
> > the complete() call to a surviving CPU via smp_call_function_single().
> >
> > This patch is untested, and probably does not even build.
> >
> > Reported-by: Peng Fan <van.freenix at gmail.com>
> > Reported-by: Russell King - ARM Linux <linux at armlinux.org.uk>
> > Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
>
> With your patch applied I no longer get the RCU warning, thanks:
>
> Tested-by: Fabio Estevam <fabio.estevam at nxp.com>
Well, I guess that it is no longer untested, and thank you for that. ;-)
I sent a more official posting of the patch.
Thanx, Paul
More information about the linux-arm-kernel
mailing list