Mailing List archive

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

[linux-dvb] Re: [PATCH] support for multiple feeds per pid



On Fri, Feb 21, 2003 at 01:50:18AM +0100, Oliver Endriss wrote:
> Emard wrote:
> > It is stronger, but from some people machine lockup
> > reports (machine hosed, ICMP PING still working) I think that this
> > lock happens during execution of hardware irq, and it's (sometimes)
> > released before finish of tasklet execution (after the hardware
> > irq has finished), while it should be actually keep locked after
> > the hardware irq, during the tasklet running and then released.
> 
> Locks should never be held longer than necessary. Taking a lock in the 
> interrupt handler and releasing it in the tasklet might lead to 

s/might/will/

> deadlocks. If you take a lock in the interrupt handler you have to 
> release in in the interrupt handler. If you take a lock in the tasklet 
> you have to release it in the tasklet.

ACK.

I think on SMP the tasklet can run on a differnt CPU than the hard irq
handler, thus spin_lock_* would lock things on one processor and
spin_unlock_* would try to unlock them on another...

The whole point using of tasklets is to keep irq handlers short
so other irqs wont be blocked for too long. But if it's not possible
do defer work from the irq handler, then using tasklets is the
wrong approach.


Johannes


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index