mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Vineet.Gupta1@synopsys.com
Cc: netdev@vger.kernel.org, Alexey.Brodkin@synopsys.com,
	romieu@fr.zoreil.com, linux-kernel@vger.kernel.org,
	arc-linux-dev@synopsys.com
Subject: Re: [PATCH] ethernet/arc/arc_emac: optimize the Tx/Tx-reclaim paths a bit
Date: Thu, 05 Sep 2013 14:24:36 -0400 (EDT)	[thread overview]
Message-ID: <20130905.142436.685399325201245026.davem@davemloft.net> (raw)
In-Reply-To: <1378299791-24598-1-git-send-email-vgupta@synopsys.com>

From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Date: Wed, 4 Sep 2013 18:33:11 +0530

> This came out of staring at code due to recent performance fix.
> 
> * TX BD reclaim can call netif_wake_queue() once, outside the loop if
>   one/more BDs were freed, NO need to do this each iteration.
> 
> * TX need not look at next BD to stop the netif queue. It rather be done
>   in the next tx call, when it actually fails as the queue seldom gets
>   full but the check nevertheless needs to be done for each packet Tx.
>   Profiled this under heavy traffic (big tar file cp, LMBench betworking
>   tests) and saw not a single hit to that code.
> 
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

You should keep the check in the transmit queueing code as a BUG check,
almost every driver has code of the form (using NIU as an example):

	if (niu_tx_avail(rp) <= (skb_shinfo(skb)->nr_frags + 1)) {
		netif_tx_stop_queue(txq);
		dev_err(np->device, "%s: BUG! Tx ring full when queue awake!\n", dev->name);
		rp->tx_errors++;
		return NETDEV_TX_BUSY;
	}

and arc_emac should too.

Otherwise queue management bugs are incredibly hard to diagnose.

I'm not applying this patch.

  reply	other threads:[~2013-09-05 18:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 13:03 Vineet Gupta
2013-09-05 18:24 ` David Miller [this message]
2013-09-06  4:24   ` Vineet Gupta
2013-09-06  5:03     ` David Miller

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=20130905.142436.685399325201245026.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=arc-linux-dev@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®