mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] x86 MCE: shut up lockdep warning
Date: Fri, 8 May 2009 20:14:48 +0800	[thread overview]
Message-ID: <20090508121448.GA1807@sli10-desk.sh.intel.com> (raw)
In-Reply-To: <20090508093757.GY23223@one.firstfloor.org>

On Fri, May 08, 2009 at 05:37:57PM +0800, Andi Kleen wrote:
> >  - it works around a lockdep warning
> > 
> >  - you did not realize the real bug while the warning was plain
> 
> Well I'm not sure you understood it either :)  Actually I'm pretty
> sure you did not. It would have been good if you had awaited proper
> review comments before commiting your patch.
> 
> I don't think here's really a real bug because cpu hotunplug is single threaded
> anyways (cpu add remove lock) and we don't do multiple discoveries in parallel.
> 
> The reason the lock is there is only during bringup with multiple CPUs
> doing this in parallel on initial bootup. But we can't race against cpu 
> hotunplug there because there's not hotunplug before the system
> is up with all configured CPUs.
> 
> So I think any way of shutting up lockdep is fine here and your
> patch is overkill and disables interrupts unnecessarily. 
yes, this isn't a real bug, but just a false warning from lockdep. It's
my fault I didn't point this out first.

> >  - plus the patch introduces a fragile (because complex)
> >    work_on_cpu() call into the CPU hotplug path, which could have 
> >    caused followup regressions.
> 
> That's a reasonable point,  but doesn't seem strong enough to
> do full irq disabling. A better fix would be to find some other
> way to shut off this lockdep warning for this case. Is there
> such a way?
I tried to assign a lockdep class to the mce lock, which is the usual
way to avoid lockdep warning, but it appears not working here.

Thanks,
Shaohua

  reply	other threads:[~2009-05-08 12:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08  3:47 Shaohua Li
2009-05-08  6:45 ` Andi Kleen
2009-05-08  9:10   ` Ingo Molnar
2009-05-08  9:37     ` Andi Kleen
2009-05-08 12:14       ` Shaohua Li [this message]
2009-05-08  8:17 ` Hidetoshi Seto
2009-05-08  8:28 ` [PATCH] x86 MCE: yet another " Hidetoshi Seto
2009-05-08  9:07   ` [tip:x86/urgent] x86: MCE: make cmci_discover_lock irq-safe tip-bot for Hidetoshi Seto
2009-05-08  8:34 ` [PATCH] x86 MCE: shut up lockdep warning Peter Zijlstra
2009-05-08 19:11   ` Andi Kleen
2009-05-08  9:04 ` Ingo Molnar

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=20090508121448.GA1807@sli10-desk.sh.intel.com \
    --to=shaohua.li@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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

all inboxes | Powered by JetHome®