Commit 17a7555b authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dev_watchdog-less-intrusive'



Eric Dumazet says:

====================
net: make dev_watchdog() less intrusive

dev_watchdog() is used on many NIC to periodically monitor TX queues
to detect hangs.

Problem is : It stops all queues, then check them, then 'unfreeze' them.

Not only this stops feeding the NIC, it also migrates all qdiscs
to be serviced on the cpu calling netif_tx_unlock(), causing
a potential latency artifact.

With many TX queues, this is becoming more visible.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b32563b6 bec251bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -869,7 +869,7 @@ static void xgene_enet_timeout(struct net_device *ndev, unsigned int txqueue)

	for (i = 0; i < pdata->txq_cnt; i++) {
		txq = netdev_get_tx_queue(ndev, i);
		txq->trans_start = jiffies;
		txq_trans_cond_update(txq);
		netif_tx_start_queue(txq);
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -766,7 +766,7 @@ static bool ag71xx_check_dma_stuck(struct ag71xx *ag)
	unsigned long timestamp;
	u32 rx_sm, tx_sm, rx_fd;

	timestamp = netdev_get_tx_queue(ag->ndev, 0)->trans_start;
	timestamp = READ_ONCE(netdev_get_tx_queue(ag->ndev, 0)->trans_start);
	if (likely(time_before(jiffies, timestamp + HZ / 10)))
		return false;

+2 −2
Original line number Diff line number Diff line
@@ -2325,7 +2325,7 @@ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
	txq = netdev_get_tx_queue(net_dev, queue_mapping);

	/* LLTX requires to do our own update of trans_start */
	txq->trans_start = jiffies;
	txq_trans_cond_update(txq);

	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) {
		fd.cmd |= cpu_to_be32(FM_FD_CMD_UPD);
@@ -2531,7 +2531,7 @@ static int dpaa_xdp_xmit_frame(struct net_device *net_dev,

	/* Bump the trans_start */
	txq = netdev_get_tx_queue(net_dev, smp_processor_id());
	txq->trans_start = jiffies;
	txq_trans_cond_update(txq);

	err = dpaa_xmit(priv, percpu_stats, smp_processor_id(), &fd);
	if (err) {
+1 −1
Original line number Diff line number Diff line
@@ -2679,7 +2679,7 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
		unsigned long trans_start;

		q = netdev_get_tx_queue(ndev, i);
		trans_start = q->trans_start;
		trans_start = READ_ONCE(q->trans_start);
		if (netif_xmit_stopped(q) &&
		    time_after(jiffies,
			       (trans_start + ndev->watchdog_timeo))) {
+1 −1
Original line number Diff line number Diff line
@@ -2058,7 +2058,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)

	tx_packets++;
	tx_bytes += skb->len;
	txq->trans_start = jiffies;
	txq_trans_cond_update(txq);
	ret = NETDEV_TX_OK;
	goto out;

Loading