From: Neil Horman <nhorman@tuxdriver.com>
To: netdev@vger.kernel.org
Cc: Neil Horman <nhorman@tuxdriver.com>,
John Fastabend <john.r.fastabend@intel.com>,
Robert Love <robert.w.love@intel.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 2/2] net: add documentation for net_prio cgroups (v3)
Date: Fri, 18 Nov 2011 11:13:41 -0500 [thread overview]
Message-ID: <1321632821-11640-3-git-send-email-nhorman@tuxdriver.com> (raw)
In-Reply-To: <1321632821-11640-1-git-send-email-nhorman@tuxdriver.com>
Add the requisite documentation to explain to new users how net_prio cgroups work
Signed-off-by:Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
CC: Robert Love <robert.w.love@intel.com>
CC: "David S. Miller" <davem@davemloft.net>
---
Documentation/cgroups/net_prio.txt | 53 ++++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
create mode 100644 Documentation/cgroups/net_prio.txt
diff --git a/Documentation/cgroups/net_prio.txt b/Documentation/cgroups/net_prio.txt
new file mode 100644
index 0000000..01b3226
--- /dev/null
+++ b/Documentation/cgroups/net_prio.txt
@@ -0,0 +1,53 @@
+Network priority cgroup
+-------------------------
+
+The Network priority cgroup provides an interface to allow an administrator to
+dynamically set the priority of network traffic generated by various
+applications
+
+Nominally, an application would set the priority of its traffic via the
+SO_PRIORITY socket option. This however, is not always possible because:
+
+1) The application may not have been coded to set this value
+2) The priority of application traffic is often a site-specific administrative
+ decision rather than an application defined one.
+
+This cgroup allows an administrator to assign a process to a group which defines
+the priority of egress traffic on a given interface. Network priority groups can
+be created by first mounting the cgroup filesystem.
+
+# mount -t cgroup -onet_prio none /sys/fs/cgroup/net_prio
+
+With the above step, the initial group acting as the parent accounting group
+becomes visible at '/sys/fs/cgroup/net_prio'. This group includes all tasks in
+the system. '/sys/fs/cgroup/net_prio/tasks' lists the tasks in this cgroup.
+
+Each net_prio cgroup contains two files that are subsystem specific
+
+net_prio.prioidx
+This file is read-only, and is simply informative. It contains a unique integer
+value that the kernel uses as an internal representation of this cgroup.
+
+net_prio.ifpriomap
+This file contains a map of the priorities assigned to traffic originating from
+processes in this group and egressing the system on various interfaces. It
+contains a list of tuples in the form <ifname priority>. Contents of this file
+can be modified by echoing a string into the file using the same tuple format.
+for example:
+
+echo "eth0 5" > /sys/fs/cgroups/net_prio/iscsi/net_prio.ifpriomap
+
+This command would force any traffic originating from processes belonging to the
+iscsi net_prio cgroup and egressing on interface eth0 to have the priority of
+said traffic set to the value 5. The parent accounting group also has a
+writeable 'net_prio.ifpriomap' file that can be used to set a system default
+priority.
+
+Priorities are set immediately prior to queueing a frame to the device
+queueing discipline (qdisc) so priorities will be assigned prior to the hardware
+queue selection being made.
+
+One usage for the net_prio cgroup is with mqprio qdisc allowing application
+traffic to be steered to hardware/driver based traffic classes. These mappings
+can then be managed by administrators or other networking protocols such as
+DCBX.
--
1.7.6.4
next prev parent reply other threads:[~2011-11-18 16:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 20:51 [PATCH 0/2] net: Add network priority cgroup Neil Horman
2011-11-16 20:51 ` [PATCH 1/2] net: add network priority cgroup infrastructure Neil Horman
2011-11-17 9:29 ` WANG Cong
2011-11-17 11:25 ` John Fastabend
2011-11-17 11:56 ` Neil Horman
2011-11-16 20:51 ` [PATCH 2/2] net: add documentation for net_prio cgroups Neil Horman
2011-11-17 21:47 ` [PATCH 0/2] net: Add network priority cgroup (v2) Neil Horman
2011-11-17 21:47 ` [PATCH 1/2] net: add network priority cgroup infrastructure (v2) Neil Horman
2011-11-18 3:17 ` John Fastabend
2011-11-18 11:50 ` Neil Horman
2011-11-17 21:47 ` [PATCH 2/2] net: add documentation for net_prio cgroups (v2) Neil Horman
2011-11-18 16:13 ` [PATCH 0/2] net: Add network priority cgroup (v3) Neil Horman
2011-11-18 16:13 ` [PATCH 1/2] net: add network priority cgroup infrastructure (v3) Neil Horman
2011-11-21 20:39 ` David Miller
2011-11-21 20:43 ` Neil Horman
2011-11-18 16:13 ` Neil Horman [this message]
2011-11-22 15:10 ` [PATCH 0/2] net: Add network priority cgroup (v4) Neil Horman
2011-11-22 15:10 ` [PATCH 1/2] net: add network priority cgroup infrastructure (v4) Neil Horman
2011-11-22 15:10 ` [PATCH 2/2] net: add documentation for net_prio cgroups (v4) Neil Horman
2011-11-22 20:23 ` [PATCH 0/2] net: Add network priority cgroup (v4) David Miller
2011-11-22 20:39 ` Neil Horman
2011-11-22 20:45 ` David Miller
2011-11-22 21:00 ` Neil Horman
2011-11-23 10:19 ` Kirill Smelkov
2011-11-23 11:49 ` Neil Horman
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=1321632821-11640-3-git-send-email-nhorman@tuxdriver.com \
--to=nhorman@tuxdriver.com \
--cc=davem@davemloft.net \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
--cc=robert.w.love@intel.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).