From: raj@tardy.cup.hp.com (Rick Jones)
To: <netdev@vger.kernel.org>
Cc: <rusty@rustcorp.com.au>, <mst@redhat.com>,
<virtualization@lists.linux-foundation.org>
Subject: [PATCH net-next] virtio_net: do not rate limit counter increments
Date: Tue, 27 Mar 2012 10:28:09 -0700 (PDT) [thread overview]
Message-ID: <20120327172809.C52572900384@tardy> (raw)
From: Rick Jones <rick.jones2@hp.com>
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 <rick.jones2@hp.com>
---
Compiled, and run briefly in a 1 vCPU guest under a netperf workload.
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 019da01..4de2760 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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);
next reply other threads:[~2012-03-27 17:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 17:28 Rick Jones [this message]
2012-03-28 6:03 ` [PATCH net-next] virtio_net: do not rate limit counter increments Rusty Russell
2012-03-28 8:30 ` Michael S. Tsirkin
2012-03-28 8:41 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2012-03-27 17:28 Rick Jones
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=20120327172809.C52572900384@tardy \
--to=raj@tardy.cup.hp.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/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.