On Sat, Apr 28, 2007 at 11:20:17AM -0400, Jeff Garzik wrote:

> >+    if (was_full)
> >+            netif_wake_queue(mac->netdev);
> >+
> 
> Isn't this was_full check redundant?  Using standard test-and-clear 
> atomic logic, netif_wake_queue() will not issue spurious wakeups.  Take 
> a look at its implementation in include/linux/netdevice.h.

It's not needed to avoid spurious wakeups, but test_and_clear_bit()
results in an atomic op even if the bit is already clear. I.e. it's a
bit heavy-handed to do if you can already know that it isn't set.

Either way it's no big deal, I'll take out the test for now. It can always
be added back in if it starts to climb on profiles when benchmarking.


-Olof
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to