diff options
author | Bert Kenward <bkenward@solarflare.com> | 2015-10-26 17:23:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-28 05:40:33 +0300 |
commit | c0f9c7e45d374ce6dc369443fa586c2fe228c345 (patch) | |
tree | c085878e09c59da0678d3efde12f01597bc8eca8 /drivers/net/ethernet/sfc/efx.c | |
parent | 080a270f5adec1ada1357eb66321e7222cc34301 (diff) | |
download | linux-c0f9c7e45d374ce6dc369443fa586c2fe228c345.tar.xz |
sfc: replace spinlocks with bit ops for busy poll locking
This patch reduces the overhead of locking for busy poll.
Previously the state was protected by a lock, whereas now
it's manipulated solely with atomic operations.
Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 974637d3ae25..6e11ee6173ce 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -2062,7 +2062,7 @@ static void efx_init_napi_channel(struct efx_channel *channel) netif_napi_add(channel->napi_dev, &channel->napi_str, efx_poll, napi_weight); napi_hash_add(&channel->napi_str); - efx_channel_init_lock(channel); + efx_channel_busy_poll_init(channel); } static void efx_init_napi(struct efx_nic *efx) @@ -2125,7 +2125,7 @@ static int efx_busy_poll(struct napi_struct *napi) if (!netif_running(efx->net_dev)) return LL_FLUSH_FAILED; - if (!efx_channel_lock_poll(channel)) + if (!efx_channel_try_lock_poll(channel)) return LL_FLUSH_BUSY; old_rx_packets = channel->rx_queue.rx_packets; |