[openib-general] Re: LLTX and netif_stop_queue
jamal
hadi at cyberus.ca
Sun Dec 19 11:33:55 PST 2004
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
More information about the general
mailing list