Netdev List
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 08/14] i40e/i40evf: bundle more descriptors when allocating buffers
Date: Mon,  9 Oct 2017 15:38:35 -0700	[thread overview]
Message-ID: <20171009223841.2557-9-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20171009223841.2557-1-jeffrey.t.kirsher@intel.com>

From: Jacob Keller <jacob.e.keller@intel.com>

Double the number of descriptors we'll bundle into one tail bump when
receiving. Empirical testing has shown that we reduce CPU utilization
and don't appear to reduce throughput or packet rate. 32 seems to be the
sweet spot, as it's half the default polling budget, so we'd essentially
reduce from 4 tail writes when polling down to 2. Increasing this up to
64 appears to have negative impacts as it may become possible that we
don't bump the tail each time we get polled, which could cause a long
delay between returning descriptors to the hardware.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.h   | 2 +-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
index c3156aa3f709..ff57ae451524 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -208,7 +208,7 @@ static inline bool i40e_test_staterr(union i40e_rx_desc *rx_desc,
 }
 
 /* How many Rx Buffers do we bundle into one write to the hardware ? */
-#define I40E_RX_BUFFER_WRITE	16	/* Must be power of 2 */
+#define I40E_RX_BUFFER_WRITE	32	/* Must be power of 2 */
 #define I40E_RX_INCREMENT(r, i) \
 	do {					\
 		(i)++;				\
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index 8f9830d7649a..8d26c85d12e1 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -191,7 +191,7 @@ static inline bool i40e_test_staterr(union i40e_rx_desc *rx_desc,
 }
 
 /* How many Rx Buffers do we bundle into one write to the hardware ? */
-#define I40E_RX_BUFFER_WRITE	16	/* Must be power of 2 */
+#define I40E_RX_BUFFER_WRITE	32	/* Must be power of 2 */
 #define I40E_RX_INCREMENT(r, i) \
 	do {					\
 		(i)++;				\
-- 
2.14.2

  parent reply	other threads:[~2017-10-09 22:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 22:38 [net-next 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-09 Jeff Kirsher
2017-10-09 22:38 ` [net-next 01/14] i40e: fix flags declaration Jeff Kirsher
2017-10-09 22:38 ` [net-next 02/14] i40e: use the safe hash table iterator when deleting mac filters Jeff Kirsher
2017-10-09 22:38 ` [net-next 03/14] i40evf: fix mac filter removal timing issue Jeff Kirsher
2017-10-09 22:38 ` [net-next 04/14] i40e/i40evf: fix incorrect default ITR values on driver load Jeff Kirsher
2017-10-09 22:38 ` [net-next 05/14] i40e/i40evf: always set the CLEARPBA flag when re-enabling interrupts Jeff Kirsher
2017-10-10 13:07   ` David Laight
2017-10-09 22:38 ` [net-next 06/14] i40e: reduce lrxqthresh from 2 to 1 Jeff Kirsher
2017-10-09 22:38 ` [net-next 07/14] i40e/i40evf: bump tail only in multiples of 8 Jeff Kirsher
2017-10-09 22:38 ` Jeff Kirsher [this message]
2017-10-09 22:38 ` [net-next 09/14] i40e: allow XPS with QoS enabled Jeff Kirsher
2017-10-09 22:38 ` [net-next 10/14] i40e: add check for return from find_first_bit call Jeff Kirsher
2017-10-09 22:38 ` [net-next 11/14] i40e: Retry AQC GetPhyAbilities to overcome I2CRead hangs Jeff Kirsher
2017-10-09 22:38 ` [net-next 12/14] i40e: use a local variable instead of calculating multiple times Jeff Kirsher
2017-10-09 22:38 ` [net-next 13/14] i40e: fix a typo Jeff Kirsher
2017-10-09 22:38 ` [net-next 14/14] i40e: Avoid some useless variables and initializers in NVM functions Jeff Kirsher
2017-10-10  1:12 ` [net-next 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-09 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=20171009223841.2557-9-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jacob.e.keller@intel.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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