lkml.org 
[lkml]   [2008]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sys_sched_yield keeps locked irq before call of schedule()

* Steven Rostedt <rostedt@goodmis.org> wrote:

>
> On Thu, 6 Nov 2008, Ingo Molnar wrote:
> >
> > * Zdenek Kabelac <zdenek.kabelac@gmail.com> wrote:
> >
> > > > is this some special warning you added? The stock kernel certainly
> > > > does not emit this warning.
> > >
> > > Yes - it's my personal debug checker that tries to watch wether irq
> > > & irqsafe are running in pair. So it shows a warning if there is a
> > > call of spin_lock_irq and irq is already dissabled.
> >
> > btw., i have added lockdep instrumentation for this two years ago,
> > it's in the upstream kernel:
> >
> > /proc/lockdep_stats: redundant hardirq ons: 7744
> > /proc/lockdep_stats: redundant hardirq offs: 1873736
> > /proc/lockdep_stats: redundant softirq ons: 0
> > /proc/lockdep_stats: redundant softirq offs: 0
> >
> > you could extend the code to trace it. See
> > kernel/lockdep.c:trace_hardirqs_on_caller(). This bit does it:
> >
> > if (unlikely(curr->hardirqs_enabled)) {
> > debug_atomic_inc(&redundant_hardirqs_on);
> > return;
> > }
> >
> > you could add a ftrace_printk("redundant hardirq") call right there,
> > enable ftrace, and enable stack tracing of each trace entry:
>
> Quick note. Currently ftrace_printk only shows up if it is set in the
> iter_ctrl.
>
> echo trace_printk > /debug/tracing/iter_ctrl
>
> I'll send out a patch to have it on by default.

ok, agreed - but in that case please make the NOP tracer
tracing_enabled=0 by default. (we'll get a lot of ftrace_printk
tracepoints by default otherwise)

Ingo


\
 
 \ /
  Last update: 2008-11-06 15:37    [W:1.816 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site