[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070428161725.GA2442@lixom.net>
Date: Sat, 28 Apr 2007 11:17:25 -0500
From: olof@...om.net (Olof Johansson)
To: Jeff Garzik <jgarzik@...ox.com>
Cc: netdev@...r.kernel.org
Subject: Re: [RESEND] [PATCH v2] [1/5] pasemi_mac: minor bugfixes
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists