public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Valdis.Kletnieks@vt.edu
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Oleg Nesterov <oleg@tv-sign.ru>
Subject: Re: 2.6.32-rc5-mmotm1101 - lockdep whinge during early boot
Date: Thu, 5 Nov 2009 19:41:03 +1030	[thread overview]
Message-ID: <200911051941.03401.rusty@rustcorp.com.au> (raw)
In-Reply-To: <6417.1257351084@turing-police.cc.vt.edu>

On Thu, 5 Nov 2009 02:41:24 am Valdis.Kletnieks@vt.edu wrote:
 [    0.344147] swapper/1 is trying to acquire lock:
> [    0.344154]  (cpu_add_remove_lock){+.+.+.}, at: [<ffffffff8103c222>] cpu_maps_update_begin+0x12/0x14
> [    0.344174]
> [    0.344175] but task is already holding lock:
> [    0.344183]  (setup_lock){+.+.+.}, at: [<ffffffff81078755>] stop_machine_create+0x12/0x9b
> [    0.344200]
> [    0.344201] which lock already depends on the new lock.

Hi Vladis!

    Sigh.  I always find reading these a complete mindfuck.

stop_machine_create: setup_lock then cpu_add_remove_lock
	(in create_workqueue_key() -> cpu_maps_update_begin())
clocksource_done_booting: clocksource_mutex then setup_lock
	(in stop_machine_create(), as above)
cpu_up: cpu_add_remove_lock then clocksource_mutex
	(in mark_tsc_unstable() -> clocksource_change_rating())

AFAICT this is our circular dependency.  But I'm no closer to knowing how to
solve it.

Oleg (CC'd) made workqueues use cpu_maps_update_begin() instead of the
more obvious get_online_cpus() in 3da1c84c00c7e5f.  Reverting that seems like
a bad idea.

Or, if the clocksource list wasn't ordered, we could change the rating without
a lock.

Either way, the locking shark is well and truly jumped...
Rusty.

  reply	other threads:[~2009-11-05  9:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 16:11 2.6.32-rc5-mmotm1101 - lockdep whinge during early boot Valdis.Kletnieks
2009-11-05  9:11 ` Rusty Russell [this message]
2009-11-05 14:10   ` Oleg Nesterov
2009-11-05 14:54     ` Martin Schwidefsky
2009-11-05 14:54     ` Thomas Gleixner
2009-11-05 15:22       ` Oleg Nesterov
2009-11-05 15:33         ` Oleg Nesterov
2009-11-05 15:54           ` Thomas Gleixner
2009-11-05 16:20             ` Martin Schwidefsky
2009-11-05 16:53               ` Thomas Gleixner
2009-11-09  9:43                 ` 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=200911051941.03401.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@tv-sign.ru \
    --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