Subject: Re: [RESEND] [PATCH v2] [1/5] pasemi_mac: minor bugfixes

From: [email-masked] (Olof Johansson)
Date: Sat, 28 Apr 2007 11:17:25 -0500

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