On Mon, Mar 06, 2006 at 04:25:32PM -0800, David S. Miller wrote:
> Wait...
>
> what about "test_and_clear_bit()"?
>
> Most implementations should be doing the light-weight test _first_,
> and only do the update if the bit isn't in the state desired.
>
> I think in such cases we can elide the memory barrier.
Hrmmm, clear_bit() doesn't seem to imply being a memory barrier, but if
we do that things can be doubly worse for the sites that use
smp_mb__*_clear_bit() (as sometimes we'd perform the barrier and then do
the locked bit clear on x86). That would hurt in net_tx_action(). Oooh,
I see some optimizations to make there...
-ben
-
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