netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] e1000: remove e1000_clean_tx_irq call from e1000_netpoll
@ 2008-06-19 21:19 Andy Gospodarek
  2008-06-27  5:11 ` Jeff Garzik
  2008-06-27  6:08 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Gospodarek @ 2008-06-19 21:19 UTC (permalink / raw)
  To: netdev; +Cc: jeffrey.t.kirsher, jesse.brandeburg


The call to e1000_clean_tx_irq in e1000_netpoll can race with the call
to e1000_clean_tx_irq in e1000_clean.  With a small bit of tweaking to
to netpoll_send_skb to simulate a system that was under extreme stress,
I was able to reproduce these concurrent calls.  This can result in
multiple frees to the skbs on the tx ring buffer.

Dropping this call from e1000_netpoll should be fine since we can rely
on the calls in e1000_clean to do what is needed since napi will poll
the hardware just after calling poll_controller.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
---
 drivers/net/e1000/e1000_main.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 0dc1ef0..047028f 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -5277,7 +5277,6 @@ e1000_netpoll(struct net_device *netdev)
 
 	disable_irq(adapter->pdev->irq);
 	e1000_intr(adapter->pdev->irq, netdev);
-	e1000_clean_tx_irq(adapter, adapter->tx_ring);
 #ifndef CONFIG_E1000_NAPI
 	adapter->clean_rx(adapter, adapter->rx_ring);
 #endif
-- 
1.5.2.1


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

* Re: [PATCH 4/4] e1000: remove e1000_clean_tx_irq call from e1000_netpoll
  2008-06-19 21:19 [PATCH 4/4] e1000: remove e1000_clean_tx_irq call from e1000_netpoll Andy Gospodarek
@ 2008-06-27  5:11 ` Jeff Garzik
  2008-06-27  6:08 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2008-06-27  5:11 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: netdev, jeffrey.t.kirsher, jesse.brandeburg

Andy Gospodarek wrote:
> The call to e1000_clean_tx_irq in e1000_netpoll can race with the call
> to e1000_clean_tx_irq in e1000_clean.  With a small bit of tweaking to
> to netpoll_send_skb to simulate a system that was under extreme stress,
> I was able to reproduce these concurrent calls.  This can result in
> multiple frees to the skbs on the tx ring buffer.
> 
> Dropping this call from e1000_netpoll should be fine since we can rely
> on the calls in e1000_clean to do what is needed since napi will poll
> the hardware just after calling poll_controller.
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> ---
>  drivers/net/e1000/e1000_main.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
> index 0dc1ef0..047028f 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -5277,7 +5277,6 @@ e1000_netpoll(struct net_device *netdev)
>  
>  	disable_irq(adapter->pdev->irq);
>  	e1000_intr(adapter->pdev->irq, netdev);
> -	e1000_clean_tx_irq(adapter, adapter->tx_ring);
>  #ifndef CONFIG_E1000_NAPI
>  	adapter->clean_rx(adapter, adapter->rx_ring);

I'm gonna push this towards .27, since this is a core behavior very late 
in the .26 game



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

* Re: [PATCH 4/4] e1000: remove e1000_clean_tx_irq call from e1000_netpoll
  2008-06-19 21:19 [PATCH 4/4] e1000: remove e1000_clean_tx_irq call from e1000_netpoll Andy Gospodarek
  2008-06-27  5:11 ` Jeff Garzik
@ 2008-06-27  6:08 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2008-06-27  6:08 UTC (permalink / raw)
  To: Andy Gospodarek; +Cc: netdev, jeffrey.t.kirsher, jesse.brandeburg

Andy Gospodarek wrote:
> The call to e1000_clean_tx_irq in e1000_netpoll can race with the call
> to e1000_clean_tx_irq in e1000_clean.  With a small bit of tweaking to
> to netpoll_send_skb to simulate a system that was under extreme stress,
> I was able to reproduce these concurrent calls.  This can result in
> multiple frees to the skbs on the tx ring buffer.
> 
> Dropping this call from e1000_netpoll should be fine since we can rely
> on the calls in e1000_clean to do what is needed since napi will poll
> the hardware just after calling poll_controller.
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> ---
>  drivers/net/e1000/e1000_main.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
> index 0dc1ef0..047028f 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -5277,7 +5277,6 @@ e1000_netpoll(struct net_device *netdev)
>  
>  	disable_irq(adapter->pdev->irq);
>  	e1000_intr(adapter->pdev->irq, netdev);
> -	e1000_clean_tx_irq(adapter, adapter->tx_ring);
>  #ifndef CONFIG_E1000_NAPI

applied (2.6.27)



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

end of thread, other threads:[~2008-06-27  6:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-19 21:19 [PATCH 4/4] e1000: remove e1000_clean_tx_irq call from e1000_netpoll Andy Gospodarek
2008-06-27  5:11 ` Jeff Garzik
2008-06-27  6:08 ` Jeff Garzik

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).