On Fri, Jun 24, 2011 at 2:14 PM, jordan hargrave <jharg93@xxxxxxxxx> wrote: > Jon, > > I finally got around to testing this. On my system, I'm seeing this set > all devices to 128 during system boot (they are originally set to 256). > Hotplug works, obviously... but with my original code it would set the > inserted device to 256, not 128. Thanks for testing it. Sounds like I might have a bug in the code. Can you confirm that the hotplug slots are the only thing connected to the root ports? > > On Thu, Jun 23, 2011 at 10:54 PM, Jon Mason <mason@xxxxxxxx> wrote: >> >> There is a sizable performance boost for having the largest possible >> maximum payload size on each PCI-E device. However, the maximum payload >> size must be uniform on a given PCI-E fabric, and each device, bridge, >> and root port can have a different max size. To find and configure the >> optimal MPS settings, one must walk the fabric and determine the largest >> MPS available on all the devices on the given fabric. >> >> However, on some architectures (notably PPC) it is known that the >> downstream communication will never be larger than 128B. With this >> known, the MPS can be configured to be the largest value supported by >> the PCI-E switches and root port. In most cases this means that the >> devices on the fabric are not limited to the lowest common denominator. >> Use with caution, if this is not 100% true then there is the possibility >> of a bus error. >> >> To choose between the two available options, two kernel boot args have >> been added to the PCI calls. "mpsmin" will provide the former behavior, >> while "mpsmax" will perform the latter behavior. By default, the former >> behavior is used. >> >> Along with the potential performance improvement, this works around an >> issue with buggy BIOS revisions found on various whitebox motherboards >> which do not configure MPS beyond one level below the root port. >> >> There is one issue with the "mpsmin" design. For PCI-E hotplug enabled >> slots not connected directly to a PCI-E root port, there can be problems >> when hotplugging devices. This is due to the possibility of hotplugging >> a device into the fabric with a smaller MPS that the devices currently >> running have configured. Modifying the MPS on the running devices could >> cause a fatal bus error due to an incoming frame being larger than the >> newly configured MPS. To work around this, the MPS for the entire >> fabric must be set to the minimum size. Any devices hotplugged into >> this fabric will have the minimum MPS set. If the PCI hotplug slot is >> directly connected to the root port and there are not other devices on >> the fabric (which seems to be the most common case), then this is not an >> issue and MPS discovery will occur as normal. >> >> Signed-off-by: Jon Mason <mason@xxxxxxxx> >> > > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html