From: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
To: jeffrey.t.kirsher@intel.com, davem@davemloft.net
Cc: denys@visp.net.lb, eric.dumazet@gmail.com, therbert@google.com,
netdev@vger.kernel.org
Subject: [PATCH net] e1000e: Change wthresh to 1 to avoid possible Tx stalls.
Date: Wed, 6 Jun 2012 17:43:55 +0900 [thread overview]
Message-ID: <20120606174355.823e9aa7.shimoda.hiroaki@gmail.com> (raw)
Denys Fedoryshchenko reported Tx stalls on e1000e with BQL enabled.
e1000e has WTHRESH which determines when Tx descripters are written
back and successive Tx interrupts are generated, and setting WTHRESH
to 5 gives efficient bus utilization but this cause possible Tx stalls,
especially on BQL enabled system.
To avoid possible Tx stalls, change WTHRESH to 1.
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Tested-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
---
drivers/net/ethernet/intel/e1000e/e1000.h | 6 +++---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index 6e6fffb..dc28078 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -175,13 +175,13 @@ struct e1000_info;
/*
* in the case of WTHRESH, it appears at least the 82571/2 hardware
* writes back 4 descriptors when WTHRESH=5, and 3 descriptors when
- * WTHRESH=4, and since we want 64 bytes at a time written back, set
- * it to 5
+ * WTHRESH=4, so setting 5 gives most efficient bus utilization but
+ * to avoid possible Tx hangs, set it to 1
*/
#define E1000_TXDCTL_DMA_BURST_ENABLE \
(E1000_TXDCTL_GRAN | /* set descriptor granularity */ \
E1000_TXDCTL_COUNT_DESC | \
- (5 << 16) | /* wthresh must be +1 more than desired */\
+ (1 << 16) | /* wthresh must be +1 more than desired */\
(1 << 8) | /* hthresh */ \
0x1f) /* pthresh */
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index a4b0435..b031312 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -2806,7 +2806,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
* set up some performance related parameters to encourage the
* hardware to use the bus more efficiently in bursts, depends
* on the tx_int_delay to be enabled,
- * wthresh = 5 ==> burst write a cacheline (64 bytes) at a time
+ * wthresh = 1 ==> burst write is disabled to consider Tx hangs
* hthresh = 1 ==> prefetch when one or more available
* pthresh = 0x1f ==> prefetch if internal cache 31 or less
* BEWARE: this seems to work but should be considered first if
--
1.7.8.6
next reply other threads:[~2012-06-06 8:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 8:43 Hiroaki SHIMODA [this message]
2012-06-06 8:46 ` [PATCH net] e1000e: Change wthresh to 1 to avoid possible Tx stalls Jeff Kirsher
2012-06-06 8:50 ` Eric Dumazet
2012-06-07 0:59 ` Jeff Kirsher
2012-06-07 1:34 ` David Miller
2012-06-07 4:24 ` Eric Dumazet
2012-06-07 4:52 ` Jeff Kirsher
2012-06-07 5:03 ` Eric Dumazet
2012-10-09 0:25 ` Frank Reppin
2012-10-09 6:07 ` Eric Dumazet
2012-10-09 17:36 ` Jesse Brandeburg
2012-10-09 21:02 ` Eric Dumazet
2012-10-09 22:48 ` Andre Tomt
2012-10-10 1:25 ` Frank Reppin
-- strict thread matches above, loose matches on Subject: below --
2012-10-11 1:34 [PATCH NET] " Jesse Brandeburg
2012-10-11 3:00 ` 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=20120606174355.823e9aa7.shimoda.hiroaki@gmail.com \
--to=shimoda.hiroaki@gmail.com \
--cc=davem@davemloft.net \
--cc=denys@visp.net.lb \
--cc=eric.dumazet@gmail.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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;
as well as URLs for NNTP newsgroup(s).