| 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@xxxxxxxxxxx> |
| Organization: | jamalopolous |
| References: | <52llbwoaej.fsf@xxxxxxxxxxx> <20041217214432.07b7b21e.davem@xxxxxxxxxxxxx> <528y7vobze.fsf@xxxxxxxxxxx> |
| 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> |
|---|---|---|
| ||
| Previous by Date: | Re: LLTX and netif_stop_queue, jamal |
|---|---|
| Next by Date: | Re: LLTX and netif_stop_queue, jamal |
| Previous by Thread: | Re: [openib-general] Re: LLTX and netif_stop_queue, Roland Dreier |
| Next by Thread: | Re: LLTX and netif_stop_queue, jamal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |