Re: v2.6.21-rt2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-05-16 at 23:32 +0200, Ingo Molnar wrote:
> * Daniel Walker <[email protected]> wrote:
> 
> > > > http://lkml.org/lkml/2007/5/3/368
> > > 
> > > hm - trace_hardirqs_on() should never be called with irqs on - 
> > > lockdep could break for example. Could you try to fix the call site 
> > > instead?
> > 
> > If that's the case why check if they're enabled inside 
> > trace_hardirqs_on() ? If that check fails you still still get the 
> > warning in my original release ..
> 
> yeah, indeed you are right - it checks the soft flag. But even then, the 
> better fix is to check for hardirqs-off first and not to flip around the 
> preempt count check in irqs_off_preempt_count() - i.e. something like 
> the patch below. Does this solve the warning you've triggered with 
> irqsoff-tracing enabled?

I don't know. irqs_off_preempt_count() could get used someplace else,
where you would want to flip the preempt_count() check .. It seems sane
to combine your patch with mine ..

irqs_off_preempt_count() (!__get_cpu_var(trace_cpu_idle) && preempt_count())

You can't call __get_cpu_var() without the a positive preempt_count(),
so the check seems backwards regardless of the other factors ..

Daniel



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux