Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1596154

Re: RCU used on incoming CPU before rcu_cpu_starting() called

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: RCU used on incoming CPU before rcu_cpu_starting() called
Date 2017-03-09 16:30 +0100
Message-ID <tj8aR-71c-11@gated-at.bofh.it> (permalink)
References <tiTvc-5bG-15@gated-at.bofh.it> <tj5Zp-5Ce-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 09, 2017 at 02:08:23PM +0100, Thomas Gleixner wrote:
> On Wed, 8 Mar 2017, Paul E. McKenney wrote:
> > [   30.694013]  lockdep_rcu_suspicious+0xe7/0x120
> > [   30.694013]  get_work_pool+0x82/0x90
> > [   30.694013]  __queue_work+0x70/0x5f0
> > [   30.694013]  queue_work_on+0x33/0x70
> > [   30.694013]  clear_sched_clock_stable+0x33/0x40
> > [   30.694013]  early_init_intel+0xe7/0x2f0
> > [   30.694013]  init_intel+0x11/0x350
> > [   30.694013]  identify_cpu+0x344/0x5a0
> > [   30.694013]  identify_secondary_cpu+0x18/0x80
> > [   30.694013]  smp_store_cpu_info+0x39/0x40
> > [   30.694013]  start_secondary+0x4e/0x100
> > [   30.694013]  start_cpu+0x14/0x14
> > 
> > Here is the relevant code from x86's smp_callin():
> > 
> > 	/*
> > 	 * Save our processor parameters. Note: this information
> > 	 * is needed for clock calibration.
> > 	 */
> > 	smp_store_cpu_info(cpuid);
> >
> > The problem is that smp_store_cpu_info() indirectly invokes
> > schedule_work(), which wants to use RCU.  But RCU isn't informed
> > of the incoming CPU until the call to notify_cpu_starting(), which
> > causes lockdep to complain bitterly about the use of RCU by the
> > premature call to schedule_work().
> 
> Right. And that want's to be fixed, not hacked around by silencing RCU.

Fair enough!

I have updated my commit to indicate yours and Frederic's discomfort with
it and marked it as not intended for upstream.  If we get an alternative
fix shortly, I will drop my commit -- but failing that at some point I
will of course start pushing this patch again.

							Thanx, Paul

> Peter????
> 
> Thanks,
> 
> 	tglx
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

RCU used on incoming CPU before rcu_cpu_starting() called "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-03-09 07:10 +0100
  Re: RCU used on incoming CPU before rcu_cpu_starting() called Thomas Gleixner <tglx@linutronix.de> - 2017-03-09 14:10 +0100
    Re: RCU used on incoming CPU before rcu_cpu_starting() called Peter Zijlstra <peterz@infradead.org> - 2017-03-09 16:20 +0100
      Re: RCU used on incoming CPU before rcu_cpu_starting() called "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-03-09 16:40 +0100
        Re: RCU used on incoming CPU before rcu_cpu_starting() called "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-03-09 17:00 +0100
    Re: RCU used on incoming CPU before rcu_cpu_starting() called "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-03-09 16:30 +0100

csiph-web