The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: lockdep warning: threadirqs and preemptoff tracer
Date: Tue, 26 May 2015 14:51:28 +0200	[thread overview]
Message-ID: <55646C50.7070106@bmw-carit.de> (raw)
In-Reply-To: <20150526083215.28f3374b@gandalf.local.home>

On 05/26/2015 02:32 PM, Steven Rostedt wrote:
> Daniel Wagner <daniel.wagner@bmw-carit.de> wrote:
>> On 05/20/2015 10:46 AM, Daniel Wagner wrote:
>> I starred for a while at the code and saw the comment in
>> __local_bh_disable_ip():
>>
>> 	/*
>> 	 * The preempt tracer hooks into preempt_count_add and will break
>> 	 * lockdep because it calls back into lockdep after SOFTIRQ_OFFSET
>> 	 * is set and before current->softirq_enabled is cleared.
>> 	 * We must manually increment preempt_count here and manually
>> 	 * call the trace_preempt_off later.
>> 	 */
>>
>> >From this I figured this might be the same problem just in the
>> enable path. The below patch made the lockdep warning disappear.
>> Though I am not sure what I breaking with this.
> 
> Don't you want to modify __local_bh_enable_ip()?

__do_softirq() calls __local_bh_disable_ip() and __local_bh_enable() and
not __local_bh_enable_ip(). I have no clue why this is done this way.
Need to look into the history.

  reply	other threads:[~2015-05-26 13:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20  8:46 lockdep warning: threadirqs and preemptoff tracer Daniel Wagner
2015-05-26 11:52 ` Daniel Wagner
2015-05-26 12:32   ` Steven Rostedt
2015-05-26 12:51     ` Daniel Wagner [this message]
2015-05-26 13:04       ` Steven Rostedt
2015-05-28  9:09         ` [PATCH v0] softirq: Call trace_preempt_on manually to prevent lockdep splatter Daniel Wagner
2015-06-02 19:37           ` 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=55646C50.7070106@bmw-carit.de \
    --to=daniel.wagner@bmw-carit.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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