LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: Possible circular locking dependency detected between cpu_hotplug_lock.rw_sem and wfc.work
Date: Thu, 27 Jul 2017 23:22:27 +1000	[thread overview]
Message-ID: <871sp2f20c.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <alpine.DEB.2.20.1707261437510.2186@nanos>

Thomas Gleixner <tglx@linutronix.de> writes:

> On Wed, 26 Jul 2017, Michael Ellerman wrote:
>
>> Hi Thomas,
>> 
>> I'm seeing the lockdep barf below on some bare metal Power8 machines.
>> 
>> This seems to be caused by our smp_cpus_done(), which does:
>> 
>>   void __init smp_cpus_done(unsigned int max_cpus)
>>   {
>>   	/*
>>   	 * We want the setup_cpu() here to be called on the boot CPU, but
>>   	 * init might run on any CPU, so make sure it's invoked on the boot
>>   	 * CPU.
>>   	 */
>>   	if (smp_ops && smp_ops->setup_cpu)
>>   		work_on_cpu_safe(boot_cpuid, smp_setup_cpu_workfn, NULL);
>> 
>> 
>> I don't think CPU hotplug can happen at this point, so I don't think
>> there's really a bug.
>> 
>> But it looks like the work_on_cpu_safe() call could just go away, since
>> you pinned init to the boot CPU in 8fb12156b8db ("init: Pin init task to
>> the boot CPU, initially"). Though I can't see where init is unpinned, so
>> maybe we do still need to do it?
>
> It's undone in sched_init_smp(). So it looks safe. The call order is:
>
>      smp_init()
> 	...
> 	smp_cpus_done()
>
>      sched_init_smp()

Great thanks.

Patch on the way.

cheers

  reply	other threads:[~2017-07-27 13:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 11:57 Possible circular locking dependency detected between cpu_hotplug_lock.rw_sem and wfc.work Michael Ellerman
2017-07-26 12:44 ` Thomas Gleixner
2017-07-27 13:22   ` Michael Ellerman [this message]
2017-07-27 13:24     ` Thomas Gleixner
2017-07-27 13:25       ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871sp2f20c.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox