[pso] [tema2] deadlock

Valentin Priescu vali.priescu at gmail.com
Sat Apr 10 21:34:38 EEST 2010


Salut .

Exista momente cand am urmatorul scenariu:

interrupt: spin_lock(&uart->lock)
interrupt: lock acquired
interrupt: spin_unlock(&uart->lock)
read: before wait_event_interruptible
read: after wait_event_interruptible
read: spin_lock_irqsave(&uart->lock, flags)
read: spin_unlock_irqrestore(&uart->lock, flags)
read: before wait_event_interruptible
interrupt: spin_lock(&uart->lock)
interrupt: lock acquired
interrupt: spin_unlock(&uart->lock)
read: after wait_event_interruptible
interrupt: spin_lock(&uart->lock)
interrupt: lock acquired
interrupt: spin_unlock(&uart->lock)
read: spin_lock_irqsave(&uart->lock, flags)
interrupt: spin_lock(&uart->lock)

read: marcheaza faptul ca sunt in functia read, iar interrupt: in handler-ul
interuperii

Partea ciudata e la ultimele 2 linii:
- sunt in read, am facut spin_lock_irqsave
- vine interuperea inaine de a face spin_lock_irqrestore
- se blocheaza la spin_lock (lock-ul era luat deja de read)

Nu inteleg de ce vine interuperea cat timp sunt in zona cu interuperile
dezactivate (spin_lock_irqsave).
Asta se intampla pe masina virtuala, cu un singur procesor.

-- 
Vali.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/lurker/list/pso.html/attachments/20100410/d599f808/attachment.htm>


More information about the pso mailing list