lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 05 Sep 2013 14:24:36 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	Vineet.Gupta1@...opsys.com
Cc:	netdev@...r.kernel.org, Alexey.Brodkin@...opsys.com,
	romieu@...zoreil.com, linux-kernel@...r.kernel.org,
	arc-linux-dev@...opsys.com
Subject: Re: [PATCH] ethernet/arc/arc_emac: optimize the Tx/Tx-reclaim
 paths a bit

From: Vineet Gupta <Vineet.Gupta1@...opsys.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@...opsys.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists