linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roland Dreier <roland@kernel.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, rostedt <rostedt@goodmis.org>
Subject: Re: lockdep false positive in double_lock_balance()?
Date: Fri, 18 May 2012 09:42:58 -0700	[thread overview]
Message-ID: <CAG4TOxM9-hHxSyu3XHFgACRYP8Rr3ogAgk=StGxbr2KCkrR81Q@mail.gmail.com> (raw)
In-Reply-To: <1337282386.4281.77.camel@twins>

> *phew* you actually made me think there ;-)

Sorry for that.

> The race you describe exists, except that's not how lockdep works. Both
> cpu's would have a different task (one would hope to presume) and the
> held lock stack is per task. So even if busiest_rq on cpu1 (lock case)
> is the same lock as this_rq on cpu0 (unlock case), they're in different
> stacks with different states.

Got it.  I confused myself between user processes (which might have
multiple threads on multiple CPUs) and kernel tasks.

> Something like this should fix it I think..

Thanks, I'll throw this in and let you know if we see this again.
But it's very rare so hard to know one way or another for quite
a while.

 - R.

  parent reply	other threads:[~2012-05-18 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1335314100-532-1-git-send-email-roland@kernel.org>
     [not found] ` <alpine.LSU.2.00.1204251411460.4188@eggly.anvils>
2012-05-16 20:00   ` lockdep false positive in double_lock_balance()? Roland Dreier
2012-05-17 19:19     ` Peter Zijlstra
2012-05-18 14:43       ` Steven Rostedt
2012-05-18 16:42       ` Roland Dreier [this message]
2012-06-06 15:54       ` [tip:sched/urgent] sched/rt: Fix lockdep annotation within find_lock_lowest_rq() tip-bot for Peter Zijlstra

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='CAG4TOxM9-hHxSyu3XHFgACRYP8Rr3ogAgk=StGxbr2KCkrR81Q@mail.gmail.com' \
    --to=roland@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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;
as well as URLs for NNTP newsgroup(s).