From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
ppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: linux-next: PowerPC WARN_ON_ONCE() after merge of the final tree (tip related)
Date: Thu, 15 Apr 2010 19:24:22 +0200 [thread overview]
Message-ID: <20100415172421.GB5069@nowhere> (raw)
In-Reply-To: <20100415140358.GA19981@elte.hu>
On Thu, Apr 15, 2010 at 04:03:58PM +0200, Ingo Molnar wrote:
> >
> >
> > diff --git a/kernel/lockdep.c b/kernel/lockdep.c
> > index 78325f8..65d4336 100644
> > --- a/kernel/lockdep.c
> > +++ b/kernel/lockdep.c
> > @@ -2298,7 +2298,11 @@ void trace_hardirqs_on_caller(unsigned long ip)
> > return;
> >
> > if (unlikely(curr->hardirqs_enabled)) {
> > + unsigned long flags;
> > +
> > + raw_local_irq_save(flags);
> > debug_atomic_inc(redundant_hardirqs_on);
> > + raw_local_irq_restore(flags);
> > return;
> > }
> > /* we'll do an OFF -> ON transition: */
>
> that looks rather ugly. Why not do a raw:
>
> this_cpu_inc(lockdep_stats.redundant_hardirqs_on);
>
> which basically open-codes debug_atomic_inc(), but without the warning?
There is also no guarantee we are in a non-preemptable section. We can then
also race against another cpu.
I'm not sure what to do.
WARNING: multiple messages have this Message-ID (diff)
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
ppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: linux-next: PowerPC WARN_ON_ONCE() after merge of the final tree (tip related)
Date: Thu, 15 Apr 2010 19:24:22 +0200 [thread overview]
Message-ID: <20100415172421.GB5069@nowhere> (raw)
In-Reply-To: <20100415140358.GA19981@elte.hu>
On Thu, Apr 15, 2010 at 04:03:58PM +0200, Ingo Molnar wrote:
> >
> >
> > diff --git a/kernel/lockdep.c b/kernel/lockdep.c
> > index 78325f8..65d4336 100644
> > --- a/kernel/lockdep.c
> > +++ b/kernel/lockdep.c
> > @@ -2298,7 +2298,11 @@ void trace_hardirqs_on_caller(unsigned long ip)
> > return;
> >
> > if (unlikely(curr->hardirqs_enabled)) {
> > + unsigned long flags;
> > +
> > + raw_local_irq_save(flags);
> > debug_atomic_inc(redundant_hardirqs_on);
> > + raw_local_irq_restore(flags);
> > return;
> > }
> > /* we'll do an OFF -> ON transition: */
>
> that looks rather ugly. Why not do a raw:
>
> this_cpu_inc(lockdep_stats.redundant_hardirqs_on);
>
> which basically open-codes debug_atomic_inc(), but without the warning?
There is also no guarantee we are in a non-preemptable section. We can then
also race against another cpu.
I'm not sure what to do.
next prev parent reply other threads:[~2010-04-15 17:24 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-15 6:12 linux-next: boot failure after merge of the final tree (tip related) Stephen Rothwell
2010-04-15 6:12 ` Stephen Rothwell
2010-04-15 6:48 ` Benjamin Herrenschmidt
2010-04-15 6:48 ` Benjamin Herrenschmidt
2010-04-15 6:49 ` linux-next: PowerPC WARN_ON_ONCE() " Ingo Molnar
2010-04-15 6:49 ` Ingo Molnar
2010-04-15 6:55 ` David Miller
2010-04-15 6:55 ` David Miller
2010-04-15 7:32 ` Ingo Molnar
2010-04-15 7:32 ` Ingo Molnar
2010-04-16 1:51 ` Benjamin Herrenschmidt
2010-04-16 1:51 ` Benjamin Herrenschmidt
2010-04-16 1:56 ` Benjamin Herrenschmidt
2010-04-16 1:56 ` Benjamin Herrenschmidt
2010-04-15 10:04 ` Stephen Rothwell
2010-04-15 10:04 ` Stephen Rothwell
2010-04-15 13:37 ` [PATCH] lockdep: Fix redundant_hardirqs_on incremented with irqs enabled Frederic Weisbecker
2010-04-27 7:32 ` Stephen Rothwell
2010-04-27 18:07 ` Frederic Weisbecker
2010-04-28 7:12 ` Stephen Rothwell
2010-04-15 13:00 ` linux-next: PowerPC WARN_ON_ONCE() after merge of the final tree (tip related) Frederic Weisbecker
2010-04-15 13:00 ` Frederic Weisbecker
2010-04-15 14:03 ` Ingo Molnar
2010-04-15 14:03 ` Ingo Molnar
2010-04-15 17:15 ` Frederic Weisbecker
2010-04-15 17:15 ` Frederic Weisbecker
2010-04-16 10:38 ` Peter Zijlstra
2010-04-16 10:38 ` Peter Zijlstra
2010-04-16 12:32 ` Frederic Weisbecker
2010-04-16 12:32 ` Frederic Weisbecker
2010-04-15 17:24 ` Frederic Weisbecker [this message]
2010-04-15 17:24 ` Frederic Weisbecker
2010-04-15 17:39 ` Ingo Molnar
2010-04-15 17:39 ` 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=20100415172421.GB5069@nowhere \
--to=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.