* [PATCH net-next] sfc: don't rearm interrupts if busy polling
@ 2017-02-06 16:50 Bert Kenward
2017-02-06 16:59 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Bert Kenward @ 2017-02-06 16:50 UTC (permalink / raw)
To: Dave Miller; +Cc: netdev, Solarflare Linux Maintainers, Eric Dumazet
Since commit 364b6055738b ("net: busy-poll: return busypolling status
to drivers"), napi_complete_done() returns a boolean that can be used
by drivers to conditionally rearm interrupts.
Testing with a 7142 shows a small latency improvement of ~100 ns.
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Cc: Eric Dumazet <edumazet@google.com>
---
drivers/net/ethernet/sfc/efx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index fcd4eeecfef4..c28cd9daf949 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -328,8 +328,8 @@ static int efx_poll(struct napi_struct *napi, int budget)
* since efx_nic_eventq_read_ack() will have no effect if
* interrupts have already been disabled.
*/
- napi_complete_done(napi, spent);
- efx_nic_eventq_read_ack(channel);
+ if (napi_complete_done(napi, spent))
+ efx_nic_eventq_read_ack(channel);
}
return spent;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] sfc: don't rearm interrupts if busy polling
2017-02-06 16:50 [PATCH net-next] sfc: don't rearm interrupts if busy polling Bert Kenward
@ 2017-02-06 16:59 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-02-06 16:59 UTC (permalink / raw)
To: bkenward; +Cc: netdev, linux-net-drivers, edumazet
From: Bert Kenward <bkenward@solarflare.com>
Date: Mon, 6 Feb 2017 16:50:55 +0000
> Since commit 364b6055738b ("net: busy-poll: return busypolling status
> to drivers"), napi_complete_done() returns a boolean that can be used
> by drivers to conditionally rearm interrupts.
>
> Testing with a 7142 shows a small latency improvement of ~100 ns.
>
> Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-06 16:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-06 16:50 [PATCH net-next] sfc: don't rearm interrupts if busy polling Bert Kenward
2017-02-06 16:59 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).