Re: more tcpdumpinfo for nfs3 problem: aix-server --- linux 2.4.15pre5 client

Trond Myklebust (trond.myklebust@fys.uio.no)
Wed, 21 Nov 2001 11:07:14 +0100


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/