All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Gloudon <jamie.gloudon@gmail.com>
To: netdev@vger.kernel.org
Cc: romieu@fr.zoreil.com, David Miller <davem@davemloft.net>, rl@hellgate.ch
Subject: Re: [BUG] via-rhine: NOHZ: local_softirq_pending 08
Date: Wed, 30 Jan 2013 00:00:04 -0400	[thread overview]
Message-ID: <51089aca.0bc9640a.49ad.06c2@mx.google.com> (raw)
In-Reply-To: <20130129.225328.896248042332851696.davem@davemloft.net>

On Tue, Jan 29, 2013 at 10:53:28PM -0500, David Miller wrote:
> From: Francois Romieu <romieu@fr.zoreil.com>
> Date: Wed, 30 Jan 2013 01:04:32 +0100
> 
> > David Miller <davem@davemloft.net> :
> > [...]
> >> I don't think you can't keep using dev_kfree_skb_irq() there.
> >> 
> >> Francois any objections to this patch?
> > 
> > None.
> > 
> > I have almost surely broken via-rhine with NOHZ as I broke the r8169
> > driver before 7dbb491878a2c51d372a8890fa45a8ff80358af1. Something like
> > the patch below could be needed as well (quick shot before bed time
> > and ~24h delay if Jamie wants to try something now).
> 
> Good catch, Jamie can you test this combined patch for us?
> 
> ====================
> via-rhine: Fix bugs in NAPI support.
> 
> 1) rhine_tx() should use dev_kfree_skb() not dev_kfree_skb_irq()
> 
> 2) rhine_slow_event_task's NAPI triggering logic is racey, it
>    should just hit the interrupt mask register.  This is the
>    same as commit 7dbb491878a2c51d372a8890fa45a8ff80358af1
>    ("r8169: avoid NAPI scheduling delay.") made to fix the same
>    problem in the r8169 driver.  From Francois Romieu.
> 
> Reported-by: Jamie Gloudon <jamie.gloudon@gmail.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
> index 7992b3e..78ace59 100644
> --- a/drivers/net/ethernet/via/via-rhine.c
> +++ b/drivers/net/ethernet/via/via-rhine.c
> @@ -1801,7 +1801,7 @@ static void rhine_tx(struct net_device *dev)
>  					 rp->tx_skbuff[entry]->len,
>  					 PCI_DMA_TODEVICE);
>  		}
> -		dev_kfree_skb_irq(rp->tx_skbuff[entry]);
> +		dev_kfree_skb(rp->tx_skbuff[entry]);
>  		rp->tx_skbuff[entry] = NULL;
>  		entry = (++rp->dirty_tx) % TX_RING_SIZE;
>  	}
> @@ -2010,11 +2010,7 @@ static void rhine_slow_event_task(struct work_struct *work)
>  	if (intr_status & IntrPCIErr)
>  		netif_warn(rp, hw, dev, "PCI error\n");
>  
> -	napi_disable(&rp->napi);
> -	rhine_irq_disable(rp);
> -	/* Slow and safe. Consider __napi_schedule as a replacement ? */
> -	napi_enable(&rp->napi);
> -	napi_schedule(&rp->napi);
> +	iowrite16(RHINE_EVENT & 0xffff, rp->base + IntrEnable);
>  
>  out_unlock:
>  	mutex_unlock(&rp->task_lock);

I did some quick netperf test with both patches applied, everything
appears to be fine (no kernel panic or tput performance degradation). 

  reply	other threads:[~2013-01-30  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24  0:08 [BUG] via-rhine: NOHZ: local_softirq_pending 08 Jamie Gloudon
2013-01-24  1:04 ` Jamie Gloudon
2013-01-29 22:47 ` David Miller
2013-01-30  0:04   ` Francois Romieu
2013-01-30  3:53     ` David Miller
2013-01-30  4:00       ` Jamie Gloudon [this message]
2013-01-30  3:54     ` Jamie Gloudon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51089aca.0bc9640a.49ad.06c2@mx.google.com \
    --to=jamie.gloudon@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rl@hellgate.ch \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.