Re: rt20 patch question

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

 



* Steven Rostedt <[email protected]> wrote:

> Ingo,
> 
> I traced this down.  It is caused by the disable_irq in vortex_timer 
> that is called via run_timer_softirq.
> 
> disable_irq can call synchronize_irq which can schedule.
> 
> And thus you get this bug since we are in a softirq.

hm. When there are threaded interrupts, we quite naturally have to 
synchronize via scheduling, in synchronize_irq() - the interrupt we are 
waiting on might be scheduled away!

> So I guess we have a case that we can schedule, but while atomic and 
> BUG when it's really not bad.  Should we add something like this:

that's not good enough, we must not schedule with the preempt_count() 
set.

one solution would be to forbid disable_irq() from softirq contexts, and 
to convert the vortex timeout function to a workqueue and use the 
*_delayed_work() APIs to drive it - and cross fingers there's not many 
places to fix.

another solution would be to make softirqs preemptible if they are 
threaded. I'm a bit uneasy about that though. In that case we'd also 
have to make HARDIRQ threading dependent on softirq threading, in the 
Kconfig.

	Ingo
-
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