[openib-general] Re: LLTX and netif_stop_queue
Eric Lemoine
eric.lemoine at gmail.com
Thu Dec 23 01:10:34 PST 2004
On Wed, 22 Dec 2004 20:29:19 -0800, David S. Miller <davem at davemloft.net> wrote:
> On Wed, 22 Dec 2004 19:49:48 +0100
> Eric Lemoine <eric.lemoine at gmail.com> wrote:
>
> > Instead, I would suggest to have LLTX drivers check whether queue is
> > stopped after they grab their private tx lock and before they check tx
> > ring fullness. That way we close the race window but keep the driver
> > bug check around.
> >
> > See attached sungem patch.
>
> That sounds about right. Nice idea. It solves the race, and retains
> the error state check.
>
> I'll apply Eric's patch, and do something similar in the other LLTX
> drivers (except loopback which has not "queue" per se so doesn't need
> this stuff).
Dave,
I still have one concern with the LLTX code (and it may be that the
correct patch is Jamal's) :
Without LLTX we do : lock(queue_lock), lock(xmit_lock),
release(queue_lock), release(xmit_lock). With LLTX (without Jamal's
patch) we do : lock(queue_lock), release(queue_lock), lock(tx_lock),
release(tx_lock). LLTX doesn't look correct because it creates a race
condition window between the the two lock-protected sections. So you
may want to reconsider Jamal's patch or pull out LLTX...
Thanks,
--
Eric
More information about the general
mailing list