From: rick.jones2@hpe.com (Rick Jones)
To: <netdev@vger.kernel.org>
Cc: <alexander.duyck@gmail.com>, <davem@davemloft.net>
Subject: [PATCH v2 net-next] documentation: Document issues with VMs and XPS and drivers enabling it on their own
Date: Thu, 25 Aug 2016 15:55:43 -0700 (PDT) [thread overview]
Message-ID: <20160825225543.BFA562900836@tardy> (raw)
From: Rick Jones <rick.jones2@hpe.com>
Since XPS was first introduced two things have happened. Some drivers
have started enabling XPS on their own initiative, and it has been
found that when a VM is sending data through a host interface with XPS
enabled, that traffic can end-up seriously out of order.
Signed-off-by: Rick Jones <rick.jones2@hpe.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt
index 59f4db2..50cc888 100644
--- a/Documentation/networking/scaling.txt
+++ b/Documentation/networking/scaling.txt
@@ -400,15 +400,31 @@ transport layer is responsible for setting ooo_okay appropriately. TCP,
for instance, sets the flag when all data for a connection has been
acknowledged.
+When the traffic source is a VM running on the host, there is no
+socket structure known to the host. In this case, unless the VM is
+itself CPU-pinned, the traffic being sent from it can end-up queued to
+multiple transmit queues and end-up being transmitted out of order.
+
+In some cases this can result in a considerable loss of performance.
+
+In such situations, XPS should not be enabled at runtime, or
+explicitly disabled if the NIC driver(s) in question enable it on
+their own. Otherwise, if possible, the VMs should be CPU pinned.
+
==== XPS Configuration
-XPS is only available if the kconfig symbol CONFIG_XPS is enabled (on by
-default for SMP). The functionality remains disabled until explicitly
-configured. To enable XPS, the bitmap of CPUs that may use a transmit
-queue is configured using the sysfs file entry:
+XPS is available only if the kconfig symbol CONFIG_XPS is enabled
+prior to building the kernel. It is enabled by default for SMP kernel
+configurations. In many cases the functionality remains disabled at
+runtime until explicitly configured by the system administrator. To
+enable XPS, the bitmap of CPUs that may use a transmit queue is
+configured using the sysfs file entry:
/sys/class/net/<dev>/queues/tx-<n>/xps_cpus
+However, some NIC drivers will configure XPS at runtime for the
+interfaces they drive, via a call to netif_set_xps_queue.
+
== Suggested Configuration
For a network device with a single transmission queue, XPS configuration
next reply other threads:[~2016-08-25 22:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 22:55 Rick Jones [this message]
2016-08-25 23:43 ` [PATCH v2 net-next] documentation: Document issues with VMs and XPS and drivers enabling it on their own Tom Herbert
2016-08-27 4:35 ` David Miller
2016-08-27 19:41 ` Tom Herbert
2016-08-29 16:26 ` Rick Jones
2016-08-29 17:35 ` Tom Herbert
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=20160825225543.BFA562900836@tardy \
--to=rick.jones2@hpe.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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 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).