lkml.org 
[lkml]   [2001]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: more tcpdumpinfo for nfs3 problem: aix-server --- linux 2.4.15pre5 client
Date
On Tuesday 20. November 2001 20:45, kuznet@ms2.inr.ac.ru wrote:

> (Call QDIO bottom half code)
> spin_lock(&QDIO_lock);
> <QDIO hard interrupt>
>
> ->spin_lock(&QDIO_lock)
> (spins...)
>
> with the same result. No help of nfs is required. :-)

Now that my blood caffeine levels are above the 'sleep' watermark, I should
probably correct the above in case Ulrich decides to slap us both with a
slander lawsuit 8-)...

Since (as I said in the original mail) CPU 1 is in a bottom half context,
both local bh and local interrupts should be disabled on that process!

Basically, the deadlock between the QDIO driver and RPC/fasync can be reduced
to:

CPU 1 CPU 2

(In BH context) (In ordinary process context)
spin_lock_irq(&lock1);
spin_lock_bh(&lock2);
dev_kfree_skb_any(skb);
<QDIO Hard interrupt>
(switch to QDIO interrupt context)
-> sk->write_space();
spin_lock(&lock1);
-> spin_lock(&lock2);


IOW:
Either we must demand that CPU 2 uses irq-safe spinlocks in order to
protect against sk->write_space(), or we must demand that CPU 1 should drop
'lock1' before being allowed to call dev_kfree_skb_any().

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

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.046 / U:2.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site