netdev
[Top] [All Lists]

Re: LLTX and netif_stop_queue

To: Roland Dreier <roland@xxxxxxxxxxx>
Subject: Re: LLTX and netif_stop_queue
From: jamal <hadi@xxxxxxxxxx>
Date: 19 Dec 2004 14:33:55 -0500
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, openib-general@xxxxxxxxxx
In-reply-to: <528y7vobze.fsf@topspin.com>
Organization: jamalopolous
References: <52llbwoaej.fsf@topspin.com> <20041217214432.07b7b21e.davem@davemloft.net> <528y7vobze.fsf@topspin.com>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, 2004-12-18 at 10:35, Roland Dreier wrote:

> By the way, am I correct in thinking that the use of xmit_lock_owner
> in qdisc_restart() is racy?

No.

>     if (!spin_trylock(&dev->xmit_lock)) {
>     /* get the lock */
> 
>                                             if 
> (!spin_trylock(&dev->xmit_lock)) {
>                                             /* fail */
>                                                 if (dev->xmit_lock_owner == 
> smp_processor_id()) {
>                                                 /* test the wrong value */
> 
>     /* set the value too late */
>     dev->xmit_lock_owner = smp_processor_id();
> 

The setting is protected by the queue lock. So no race.

cheers,
jamal


<Prev in Thread] Current Thread [Next in Thread>