netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i40e: Invoke softirqs after napi_reschedule
@ 2017-01-13  1:04 Benjamin Poirier
  2017-01-13  1:15 ` Eric Dumazet
  2017-01-14  1:27 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Poirier @ 2017-01-13  1:04 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: intel-wired-lan, netdev

The following message is logged from time to time when using i40e:
NOHZ: local_softirq_pending 08

i40e may schedule napi from a workqueue. Afterwards, softirqs are not run
in a deterministic time frame. The problem is the same as what was
described in commit ec13ee80145c ("virtio_net: invoke softirqs after
__napi_schedule") and this patch applies the same fix to i40e.

Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index ad4cf63..d65488c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4621,8 +4621,10 @@ static void i40e_detect_recover_hung_queue(int q_idx, struct i40e_vsi *vsi)
 	 */
 	if ((!tx_pending_hw) && i40e_get_tx_pending(tx_ring, true) &&
 	    (!(val & I40E_PFINT_DYN_CTLN_INTENA_MASK))) {
+		local_bh_disable();
 		if (napi_reschedule(&tx_ring->q_vector->napi))
 			tx_ring->tx_stats.tx_lost_interrupt++;
+		local_bh_enable();
 	}
 }
 
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] i40e: Invoke softirqs after napi_reschedule
  2017-01-13  1:04 [PATCH] i40e: Invoke softirqs after napi_reschedule Benjamin Poirier
@ 2017-01-13  1:15 ` Eric Dumazet
  2017-01-13  1:51   ` Benjamin Poirier
  2017-01-14  1:27 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2017-01-13  1:15 UTC (permalink / raw)
  To: Benjamin Poirier; +Cc: Jeff Kirsher, intel-wired-lan, netdev

On Thu, 2017-01-12 at 17:04 -0800, Benjamin Poirier wrote:
> The following message is logged from time to time when using i40e:
> NOHZ: local_softirq_pending 08
> 
> i40e may schedule napi from a workqueue. Afterwards, softirqs are not run
> in a deterministic time frame. The problem is the same as what was
> described in commit ec13ee80145c ("virtio_net: invoke softirqs after
> __napi_schedule") and this patch applies the same fix to i40e.

Yes, I believe mlx4 has a similar problem in mlx4_en_recover_from_oom()

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i40e: Invoke softirqs after napi_reschedule
  2017-01-13  1:15 ` Eric Dumazet
@ 2017-01-13  1:51   ` Benjamin Poirier
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Poirier @ 2017-01-13  1:51 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Jeff Kirsher, intel-wired-lan, netdev

On 2017/01/12 17:15, Eric Dumazet wrote:
> On Thu, 2017-01-12 at 17:04 -0800, Benjamin Poirier wrote:
> > The following message is logged from time to time when using i40e:
> > NOHZ: local_softirq_pending 08
> > 
> > i40e may schedule napi from a workqueue. Afterwards, softirqs are not run
> > in a deterministic time frame. The problem is the same as what was
> > described in commit ec13ee80145c ("virtio_net: invoke softirqs after
> > __napi_schedule") and this patch applies the same fix to i40e.
> 
> Yes, I believe mlx4 has a similar problem in mlx4_en_recover_from_oom()

Indeed, I was going to send a patch for mlx4 after this one is accepted.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i40e: Invoke softirqs after napi_reschedule
  2017-01-13  1:04 [PATCH] i40e: Invoke softirqs after napi_reschedule Benjamin Poirier
  2017-01-13  1:15 ` Eric Dumazet
@ 2017-01-14  1:27 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-01-14  1:27 UTC (permalink / raw)
  To: bpoirier; +Cc: jeffrey.t.kirsher, intel-wired-lan, netdev

From: Benjamin Poirier <bpoirier@suse.com>
Date: Thu, 12 Jan 2017 17:04:14 -0800

> The following message is logged from time to time when using i40e:
> NOHZ: local_softirq_pending 08
> 
> i40e may schedule napi from a workqueue. Afterwards, softirqs are not run
> in a deterministic time frame. The problem is the same as what was
> described in commit ec13ee80145c ("virtio_net: invoke softirqs after
> __napi_schedule") and this patch applies the same fix to i40e.
> 
> Signed-off-by: Benjamin Poirier <bpoirier@suse.com>

I hope to see this from one of Jeff's pull requests to me in the
near future.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-14  1:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13  1:04 [PATCH] i40e: Invoke softirqs after napi_reschedule Benjamin Poirier
2017-01-13  1:15 ` Eric Dumazet
2017-01-13  1:51   ` Benjamin Poirier
2017-01-14  1:27 ` 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).