linux-kernel-test/arch/x86
Jon Mason b03e7495a8 PCI: Set PCI-E Max Payload Size on fabric
On a given PCI-E fabric, each device, bridge, and root port can have a
different PCI-E maximum payload size.  There is a sizable performance
boost for having the largest possible maximum payload size on each PCI-E
device.  However, if improperly configured, fatal bus errors can occur.
Thus, it is important to ensure that PCI-E payloads sends by a device
are never larger than the MPS setting of all devices on the way to the
destination.

This can be achieved two ways:

- A conservative approach is to use the smallest common denominator of
  the entire tree below a root complex for every device on that fabric.

This means for example that having a 128 bytes MPS USB controller on one
leg of a switch will dramatically reduce performances of a video card or
10GE adapter on another leg of that same switch.

It also means that any hierarchy supporting hotplug slots (including
expresscard or thunderbolt I suppose, dbl check that) will have to be
entirely clamped to 128 bytes since we cannot predict what will be
plugged into those slots, and we cannot change the MPS on a "live"
system.

- A more optimal way is possible, if it falls within a couple of
  constraints:
* The top-level host bridge will never generate packets larger than the
  smallest TLP (or if it can be controlled independently from its MPS at
  least)
* The device will never generate packets larger than MPS (which can be
  configured via MRRS)
* No support of direct PCI-E <-> PCI-E transfers between devices without
  some additional code to specifically deal with that case

Then we can use an approach that basically ignores downstream requests
and focuses exclusively on upstream requests. In that case, all we need
to care about is that a device MPS is no larger than its parent MPS,
which allows us to keep all switches/bridges to the max MPS supported by
their parent and eventually the PHB.

In this case, your USB controller would no longer "starve" your 10GE
Ethernet and your hotplug slots won't affect your global MPS.
Additionally, the hotplugged devices themselves can be configured to a
larger MPS up to the value configured in the hotplug bridge.

To choose between the two available options, two PCI kernel boot args
have been added to the PCI calls.  "pcie_bus_safe" will provide the
former behavior, while "pcie_bus_perf" will perform the latter behavior.
By default, the latter behavior is used.

NOTE: due to the location of the enablement, each arch will need to add
calls to this function.  This patch only enables x86.

This patch includes a number of changes recommended by Benjamin
Herrenschmidt.

Tested-by: Jordan_Hargrave@dell.com
Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-08-01 11:49:16 -07:00
..
boot x86, build: Do not set the root_dev field in bzImage 2011-05-25 12:46:05 -07:00
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
crypto crypto: ghash-intel - Fix set but not used in ghash_async_setkey() 2011-06-30 07:43:42 +08:00
ia32 atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
include/asm atomic: cleanup asm-generic atomic*.h inclusion 2011-07-26 16:49:47 -07:00
kernel atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
kvm atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
lguest lguest: Fix translation count about wikipedia's cpuid page 2011-07-22 14:39:50 +09:30
lib atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
math-emu
mm atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
net net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
oprofile x86, perf: Make copy_from_user_nmi() a library function 2011-07-21 20:41:57 +02:00
pci PCI: Set PCI-E Max Payload Size on fabric 2011-08-01 11:49:16 -07:00
platform Merge branch 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-07-26 11:11:54 -07:00
power
tools
vdso x86-64, vdso: Do not allocate memory for the vDSO 2011-07-21 13:41:53 -07:00
video
xen Merge branch 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2011-07-29 23:33:40 -07:00
.gitignore
Kbuild net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
Kconfig Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2011-07-29 23:35:05 -07:00
Kconfig.cpu x86: Add support for cmpxchg_double 2011-06-25 12:17:32 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile
Makefile_32.cpu x86, cpu: Move AMD Elan Kconfig under "Processor family" 2011-04-08 13:01:25 -07:00