RE: [RFC PATCH] bnx2x: fix tx queue locking and memory barriers

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Vladislav Zolotarov
Date: Thursday, February 25, 2010 - 6:28 am

Stanislaw,

there is no need for memory barrier in bnx2x_tx_avail() as long as they are taken outside the function the way we minimize the possibility of calls for that barrier only to the rare cases, when the ring is going to be closed (XOFF).

The same is with the smp_mb() in bnx2x_tx_int() - we don't want to call it unless we really needed and this is only in the case we need to XON the queue which is currently XOFFed.

The tx_lock() is not needed there as well. There is a slight and very hypothetical possibility for the case when we might release the queue, when it's full and then there is a possibility that bnx2x_start_xmit() will return NETIF_TX_BUSY. And even if it happens (while nobody has reported about such a case) it's not fatal.

Dave, I'm running stress tests on the patch, which will eliminate even that hypothetical issue, I've mentioned before. Once we fill confident with this patch we'll send it to u.

Thanks,
vlad


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH] bnx2x: fix tx queue locking and memory barriers, Stanislaw Gruszka, (Thu Feb 25, 6:08 am)
RE: [RFC PATCH] bnx2x: fix tx queue locking and memory bar ..., Vladislav Zolotarov, (Thu Feb 25, 6:28 am)
Re: [RFC PATCH] bnx2x: fix tx queue locking and memory bar ..., Stanislaw Gruszka, (Thu Feb 25, 8:40 am)
RE: [RFC PATCH] bnx2x: fix tx queue locking and memory bar ..., Vladislav Zolotarov, (Thu Feb 25, 8:49 am)
Re: [RFC PATCH] bnx2x: fix tx queue locking and memory bar ..., Stanislaw Gruszka, (Thu Feb 25, 9:03 am)
RE: [RFC PATCH] bnx2x: fix tx queue locking and memory bar ..., Vladislav Zolotarov, (Thu Feb 25, 9:14 am)
Re: [RFC PATCH] bnx2x: fix tx queue locking and memory bar ..., Stanislaw Gruszka, (Thu Feb 25, 9:16 am)
Re: [RFC PATCH] bnx2x: fix tx queue locking and memory bar ..., Stanislaw Gruszka, (Thu Mar 11, 6:10 am)