Re: [sungem] proposal for a new locking strategy

2006-11-06 Thread Stephen Hemminger
On Sun, 5 Nov 2006 21:11:34 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:52:45 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:28:33

Re: [sungem] proposal for a new locking strategy

2006-11-06 Thread Eric Lemoine
On 11/6/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 21:11:34 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:52:45 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger

Re: [sungem] proposal for a new locking strategy

2006-11-06 Thread Stephen Hemminger
On Mon, 6 Nov 2006 21:55:20 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/6/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 21:11:34 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:52:45

Re: [sungem] proposal for a new locking strategy

2006-11-06 Thread Eric Lemoine
On 11/6/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Mon, 6 Nov 2006 21:55:20 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/6/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 21:11:34 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger

[sungem] proposal for a new locking strategy

2006-11-05 Thread Eric Lemoine
Hi! Some (long) time ago benh wrote a blaming comment in sungem.c about that driver's locking strategy. That comment basically says that we probably don't need two spinlocks. I agree! Proposal: Today's sungem effectively uses two spinlock's: lock and tx_lock. tx_lock is held by the xmit

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Benjamin Herrenschmidt
On Sun, 2006-11-05 at 14:00 +0100, Eric Lemoine wrote: Hi! Some (long) time ago benh wrote a blaming comment in sungem.c about that driver's locking strategy. That comment basically says that we probably don't need two spinlocks. Yeah :) Note that I mostly blamed myself there ... Just never

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Eric Lemoine
On 11/5/06, Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: On Sun, 2006-11-05 at 14:00 +0100, Eric Lemoine wrote: Hi! Some (long) time ago benh wrote a blaming comment in sungem.c about that driver's locking strategy. That comment basically says that we probably don't need two spinlocks.

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Stephen Hemminger
On Sun, 5 Nov 2006 14:17:38 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: On Sun, 2006-11-05 at 14:00 +0100, Eric Lemoine wrote: Hi! Some (long) time ago benh wrote a blaming comment in sungem.c about that driver's locking

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Eric Lemoine
You could also just use net_tx_lock() now. You mean netif_tx_lock()? Thanks for letting me know about that function. Yes, I may need it. tg3 and bnx2 use it to wake up the transmit queue: if (unlikely(netif_queue_stopped(tp-dev) (tg3_tx_avail(tp)

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Stephen Hemminger
On Sun, 5 Nov 2006 18:28:33 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: You could also just use net_tx_lock() now. You mean netif_tx_lock()? Thanks for letting me know about that function. Yes, I may need it. tg3 and bnx2 use it to wake up the transmit queue: if

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Eric Lemoine
On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:28:33 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: You could also just use net_tx_lock() now. You mean netif_tx_lock()? Thanks for letting me know about that function. Yes, I may need it. tg3 and bnx2 use it to

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Stephen Hemminger
On Sun, 5 Nov 2006 18:52:45 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:28:33 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: You could also just use net_tx_lock() now. You mean netif_tx_lock()? Thanks

Re: [sungem] proposal for a new locking strategy

2006-11-05 Thread Eric Lemoine
On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:52:45 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: On 11/5/06, Stephen Hemminger [EMAIL PROTECTED] wrote: On Sun, 5 Nov 2006 18:28:33 +0100 Eric Lemoine [EMAIL PROTECTED] wrote: You could also just use