From: Kevin Winchester <kjwinchester@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Sitsofe Wheeler <sitsofe@yahoo.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [X86][BISECTED] WARNING: at kernel/lockdep.c:2680
Date: Thu, 05 Jun 2008 20:53:13 -0300 [thread overview]
Message-ID: <48487C69.7000202@gmail.com> (raw)
In-Reply-To: <20080605130823.GD6332@elte.hu>
Ingo Molnar wrote:
> * Sitsofe Wheeler <sitsofe@yahoo.com> wrote:
>
>> OK I've managed to bisect this down to commit
>> [c6531cce6e6e4b99bcda46b6268d6f2d9e30aea4] (sched: do not trace
>> sched_clock):
>>
>> commit c6531cce6e6e4b99bcda46b6268d6f2d9e30aea4
>> Author: Ingo Molnar <mingo@elte.hu>
>> Date: Mon May 12 21:21:14 2008 +0200
>>
>> sched: do not trace sched_clock
>>
>> The tracer uses sched_clock, so do not trace it.
>>
>> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>>
>> Reverting this made the lockdep warning go away. Here is the bisection log:
>
> ah, good find! Does the patch below (instead of the full revert) fix it
> as well? I've queued the fix up into tip/tracing/ftrace.
>
> Ingo
>
> ---------------->
> Subject: sched: sched_clock() lockdep fix
> From: Ingo Molnar <mingo@elte.hu>
> Date: Thu Jun 05 15:04:17 CEST 2008
>
> Sitsofe Wheeler reported a lockdep warning and bisected it down to:
>
>> commit c6531cce6e6e4b99bcda46b6268d6f2d9e30aea4
>> Author: Ingo Molnar <mingo@elte.hu>
>> Date: Mon May 12 21:21:14 2008 +0200
>>
>> sched: do not trace sched_clock
>
> do not use raw irq flags in cpu_clock() as it causes lockdep to lose
> track of the true state of the IRQ flag.
>
> Reported-and-bisected-by: Sitsofe Wheeler <sitsofe@yahoo.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> kernel/sched.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux/kernel/sched.c
> ===================================================================
> --- linux.orig/kernel/sched.c
> +++ linux/kernel/sched.c
> @@ -862,7 +862,7 @@ unsigned long long notrace cpu_clock(int
> unsigned long long prev_cpu_time, time, delta_time;
> unsigned long flags;
>
> - raw_local_irq_save(flags);
> + local_irq_save(flags);
> prev_cpu_time = per_cpu(prev_cpu_time, cpu);
> time = __cpu_clock(cpu) + per_cpu(time_offset, cpu);
> delta_time = time-prev_cpu_time;
> @@ -871,7 +871,7 @@ unsigned long long notrace cpu_clock(int
> time = __sync_cpu_clock(time, cpu);
> per_cpu(prev_cpu_time, cpu) = time;
> }
> - raw_local_irq_restore(flags);
> + local_irq_restore(flags);
>
> return time;
> }
>
I didn't manage to get through a bisection run for the warning - thanks
to Sitsofe for doing it. The patch does eliminate the warning for me.
Thanks,
--
Kevin Winchester
next prev parent reply other threads:[~2008-06-05 23:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 23:47 linux-next: WARNING: at kernel/lockdep.c:2680 check_flags+0x98/0x151() Kevin Winchester
2008-06-03 7:53 ` Sitsofe Wheeler
2008-06-03 8:53 ` Peter Zijlstra
2008-06-03 12:22 ` Kevin Winchester
2008-06-03 16:28 ` Johannes Weiner
2008-06-03 16:34 ` Peter Zijlstra
2008-06-04 17:50 ` [X86][BISECTED] WARNING: at kernel/lockdep.c:2680 Sitsofe Wheeler
[not found] ` <20080605130823.GD6332@elte.hu>
2008-06-05 23:53 ` Kevin Winchester [this message]
2008-06-04 7:45 ` linux-next: WARNING: at kernel/lockdep.c:2680 check_flags+0x98/0x151() Sitsofe Wheeler
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=48487C69.7000202@gmail.com \
--to=kjwinchester@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sitsofe@yahoo.com \
--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