virtio_net: do not rate limit counter increments
Subsystems (4)
PATCH 1/1 virtio_net: do not rate limit counter increments
From: Rick Jones <[email protected]>
While it is desirable to rate limit certain messages, it is not desirable to rate limit the incrementing of counters associated with those messages.
---
Compiled, and run briefly in a 1 vCPU guest under a netperf workload.
drivers/net/virtio_net.c +4 -3
@@ -625,12 +625,13 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)/* This can happen with OOM and indirect buffers. */ if (unlikely (capacity <0 )) { -if (net_ratelimit ()) { -if (likely (capacity == -ENOMEM )) { +if (likely (capacity == -ENOMEM )) { +if (net_ratelimit ()) {dev_warn (&dev->dev,"TX queue failure: out of memory\n" ); }else { - dev->stats.tx_fifo_errors++; + dev->stats.tx_fifo_errors++; +if (net_ratelimit ())dev_warn (&dev->dev,"Unexpected TX queue failure: %d\n" , capacity);
Quoted 7 lines · On Tue, 27 Mar 2012 10:28:09 -0700 (PDT), [email protected] (Rick Jones)…
From: Rick Jones <[email protected]>
While it is desirable to rate limit certain messages, it is not desirable to rate limit the incrementing of counters associated with those messages.
Signed-off-by Rick Jones <[email protected]>
Thanks!
Rusty.
Quoted 22 lines
drivers/net/virtio_net.c +4
-3@@ -625,12 +625,13 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)/* This can happen with OOM and indirect buffers. */ if (unlikely (capacity <0 )) { -if (net_ratelimit ()) { -if (likely (capacity == -ENOMEM )) { +if (likely (capacity == -ENOMEM )) { +if (net_ratelimit ()) {dev_warn (&dev->dev,"TX queue failure: out of memory\n" ); }else { - dev->stats.tx_fifo_errors++; + dev->stats.tx_fifo_errors++; +if (net_ratelimit ())dev_warn (&dev->dev,"Unexpected TX queue failure: %d\n" , capacity);
Signature · 1 line
How could I marry someone with more hair than me? http://baldalex.org
Quoted 7 lines · Rick Jones
From: Rick Jones <[email protected]>
While it is desirable to rate limit certain messages, it is not desirable to rate limit the incrementing of counters associated with those messages.
Signed-off-by Rick Jones <[email protected]>
Dave, can you apply pls? Thanks!
Quoted 26 lines
---
Compiled, and run briefly in a 1 vCPU guest under a netperf workload.
drivers/net/virtio_net.c +4
-3@@ -625,12 +625,13 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)/* This can happen with OOM and indirect buffers. */ if (unlikely (capacity <0 )) { -if (net_ratelimit ()) { -if (likely (capacity == -ENOMEM )) { +if (likely (capacity == -ENOMEM )) { +if (net_ratelimit ()) {dev_warn (&dev->dev,"TX queue failure: out of memory\n" ); }else { - dev->stats.tx_fifo_errors++; + dev->stats.tx_fifo_errors++; +if (net_ratelimit ())dev_warn (&dev->dev,"Unexpected TX queue failure: %d\n" , capacity);
David Miller
maintainerFrom: "Michael S. Tsirkin" <[email protected]>
Date: Wed, 28 Mar 2012 10:30:46 +0200
Quoted 7 lines · Rick Jones
Quoted 6 lines
From: Rick Jones <[email protected]>
While it is desirable to rate limit certain messages, it is not desirable to rate limit the incrementing of counters associated with those messages.
Quoted 6 lines
Quoted 1 line
Signed-off-by Rick Jones <[email protected]>Dave, can you apply pls? Thanks!
Done.