Skip to contentSkip to conversation

PCI: Document PCIE BUS MPS parameters

PATCH In review Yijing Wang 3 participants 5 messages Jan 23, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Document PCIE BUS MPS parameters

Document PCIE BUS MPS parameters pcie_bus_tune_off, pcie_bus_safe, pcie_bus_peer2peer, pcie_bus_perf into Documentation/kernel-parameters.txt. These parameters were introduced by Jon Mason <[email protected]> at commit 5f39e6705 and commit b03e7495a8. Document these into kernel-parameters.txt help users to understand and use the parameters.

---
 Documentation/kernel-parameters.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +13 -0
index 363e348..4dfa8d2 100644
@@ -2227,6 +2227,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 				This sorting is done to get a device
 				order compatible with older (<= 2.4) kernels.
 		nobfsort	Don't sort PCI devices into breadth-first order.
+		pcie_bus_tune_off	[X86] Disable PCI-E MPS turning and using
+				the BIOS configured MPS defaults.
+		pcie_bus_safe	[X86] Use the smallest common denominator MPS
+				of the entire tree below a root complex for every device
+				on that fabric. Can avoid inconsistent mps problem caused
+				by hotplug.
+		pcie_bus_perf	[X86] Configure pcie device MPS to the largest
+				allowable MPS based on its parent bus.Improve performance
+				as much as possible.
+		pcie_bus_peer2peer	[X86] Make the system wide MPS the smallest
+				possible value (128B).This configuration could prevent it
+				from working by having the MPS on one root port different
+				than the MPS on another.
 		cbiosize=nn[KMG]	The fixed amount of bus space which is
 				reserved for the CardBus bridge's IO window.
 				The default value is 256 bytes.
Signature · 1 line
1.7.1
#1 lore raw
Quoted 26 lines · Yijing Wang

Document PCIE BUS MPS parameters pcie_bus_tune_off, pcie_bus_safe, pcie_bus_peer2peer, pcie_bus_perf into Documentation/kernel-parameters.txt. These parameters were introduced by Jon Mason <[email protected]> at commit 5f39e6705 and commit b03e7495a8. Document these into kernel-parameters.txt help users to understand and use the parameters.

---
 Documentation/kernel-parameters.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +6 -0
index 363e348..4dfa8d2 100644
@@ -2227,6 +2227,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 				This sorting is done to get a device
 				order compatible with older (<= 2.4) kernels.
 		nobfsort	Don't sort PCI devices into breadth-first order.
+		pcie_bus_tune_off	[X86] Disable PCI-E MPS turning and using
+				the BIOS configured MPS defaults.
+		pcie_bus_safe	[X86] Use the smallest common denominator MPS
+				of the entire tree below a root complex for every device
+				on that fabric. Can avoid inconsistent mps problem caused
+				by hotplug.

Documentation/kernel-parameters.txt bytes respectively. Such letter suffixes can also be entirely omitted. · line 2245

Quoted 10 lines
Documentation/kernel-parameters.txt +7 -0
+		pcie_bus_perf	[X86] Configure pcie device MPS to the largest
+				allowable MPS based on its parent bus.Improve performance
+				as much as possible.
+		pcie_bus_peer2peer	[X86] Make the system wide MPS the smallest
+				possible value (128B).This configuration could prevent it
+				from working by having the MPS on one root port different
+				than the MPS on another.
 		cbiosize=nn[KMG]	The fixed amount of bus space which is
 				reserved for the CardBus bridge's IO window.
 				The default value is 256 bytes.

I was searching for documentation on this the other day.

It's not just X86 that use these options, PowerPC and Tile also use them (grep for users of pcie_bus_configure_settings). I've also noticed a call to it from hotplug as well...

In addition these options also have an effect on MRRS - I've not figured out what effect they have, but you can look in drivers/pci/probe.c at the pcie_write_mrrs function.

Andrew Murray

#2 lore raw
Quoted 39 lines · Andrew Murray
Quoted 26 lines · Yijing Wang

Document PCIE BUS MPS parameters pcie_bus_tune_off, pcie_bus_safe, pcie_bus_peer2peer, pcie_bus_perf into Documentation/kernel-parameters.txt. These parameters were introduced by Jon Mason <[email protected]> at commit 5f39e6705 and commit b03e7495a8. Document these into kernel-parameters.txt help users to understand and use the parameters.

---
 Documentation/kernel-parameters.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +6 -0
index 363e348..4dfa8d2 100644
@@ -2227,6 +2227,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 				This sorting is done to get a device
 				order compatible with older (<= 2.4) kernels.
 		nobfsort	Don't sort PCI devices into breadth-first order.
+		pcie_bus_tune_off	[X86] Disable PCI-E MPS turning and using
+				the BIOS configured MPS defaults.
+		pcie_bus_safe	[X86] Use the smallest common denominator MPS
+				of the entire tree below a root complex for every device
+				on that fabric. Can avoid inconsistent mps problem caused
+				by hotplug.

Documentation/kernel-parameters.txt bytes respectively. Such letter suffixes can also be entirely omitted. · line 2245

Quoted 10 lines
Documentation/kernel-parameters.txt +7 -0
+		pcie_bus_perf	[X86] Configure pcie device MPS to the largest
+				allowable MPS based on its parent bus.Improve performance
+				as much as possible.
+		pcie_bus_peer2peer	[X86] Make the system wide MPS the smallest
+				possible value (128B).This configuration could prevent it
+				from working by having the MPS on one root port different
+				than the MPS on another.
 		cbiosize=nn[KMG]	The fixed amount of bus space which is
 				reserved for the CardBus bridge's IO window.
 				The default value is 256 bytes.

I was searching for documentation on this the other day.

Quoted 3 lines

It's not just X86 that use these options, PowerPC and Tile also use them (grep for users of pcie_bus_configure_settings). I've also noticed a call to it from hotplug as well...

Hi Andrew,
Thanks for reminder! I will update this patch right now.

Quoted 4 lines

In addition these options also have an effect on MRRS - I've not figured out what effect they have, but you can look in drivers/pci/probe.c at the pcie_write_mrrs function.

This is a separate issue, Andrew, can you provide the effetct problem log or detail information? That will helps us to analyze this issue.

Quoted 9 lines

Andrew Murray

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 48 lines · Yijing Wang

??? 2013-01-23 17:21, Andrew Murray ??????:

Quoted 39 lines · Yijing Wang
Quoted 26 lines

Document PCIE BUS MPS parameters pcie_bus_tune_off, pcie_bus_safe, pcie_bus_peer2peer, pcie_bus_perf into Documentation/kernel-parameters.txt. These parameters were introduced by Jon Mason <[email protected]> at commit 5f39e6705 and commit b03e7495a8. Document these into kernel-parameters.txt help users to understand and use the parameters.

---
 Documentation/kernel-parameters.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +6 -0
index 363e348..4dfa8d2 100644
@@ -2227,6 +2227,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 				This sorting is done to get a device
 				order compatible with older (<= 2.4) kernels.
 		nobfsort	Don't sort PCI devices into breadth-first order.
+		pcie_bus_tune_off	[X86] Disable PCI-E MPS turning and using
+				the BIOS configured MPS defaults.
+		pcie_bus_safe	[X86] Use the smallest common denominator MPS
+				of the entire tree below a root complex for every device
+				on that fabric. Can avoid inconsistent mps problem caused
+				by hotplug.

Documentation/kernel-parameters.txt bytes respectively. Such letter suffixes can also be entirely omitted. · line 2245

Quoted 10 lines
Documentation/kernel-parameters.txt +7 -0
+		pcie_bus_perf	[X86] Configure pcie device MPS to the largest
+				allowable MPS based on its parent bus.Improve performance
+				as much as possible.
+		pcie_bus_peer2peer	[X86] Make the system wide MPS the smallest
+				possible value (128B).This configuration could prevent it
+				from working by having the MPS on one root port different
+				than the MPS on another.
 		cbiosize=nn[KMG]	The fixed amount of bus space which is
 				reserved for the CardBus bridge's IO window.
 				The default value is 256 bytes.

I was searching for documentation on this the other day.

Quoted 3 lines

It's not just X86 that use these options, PowerPC and Tile also use them (grep for users of pcie_bus_configure_settings). I've also noticed a call to it from hotplug as well...

Hi Andrew,
Thanks for reminder! I will update this patch right now.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

In addition these options also have an effect on MRRS - I've not figured out what effect they have, but you can look in drivers/pci/probe.c at the pcie_write_mrrs function.

This is a separate issue, Andrew, can you provide the effetct problem log or detail information? That will helps us to analyze this issue.

No this isn't a bug. When pcie_bus_perf is set, not only does it change the MPS as described in your documentation - but it also changes the MRRS for better performance. I felt this should also be included in your documentation of pcie_bus_perf.

The pcie_write_mrrs function uses pcie_bus_config to determine if a change to the MRRS should be made.

(What I don't understand is that the comments in this function suggest the MRRS cannot be larger than the MPS - I thought it could be?)

Andrew Murray

#4 lore raw
Quoted 53 lines · Andrew Murray
Quoted 52 lines · Yijing Wang

??? 2013-01-23 17:21, Andrew Murray ??????:

Quoted 39 lines · Yijing Wang
Quoted 26 lines

Document PCIE BUS MPS parameters pcie_bus_tune_off, pcie_bus_safe, pcie_bus_peer2peer, pcie_bus_perf into Documentation/kernel-parameters.txt. These parameters were introduced by Jon Mason <[email protected]> at commit 5f39e6705 and commit b03e7495a8. Document these into kernel-parameters.txt help users to understand and use the parameters.

---
 Documentation/kernel-parameters.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +6 -0
index 363e348..4dfa8d2 100644
@@ -2227,6 +2227,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 				This sorting is done to get a device
 				order compatible with older (<= 2.4) kernels.
 		nobfsort	Don't sort PCI devices into breadth-first order.
+		pcie_bus_tune_off	[X86] Disable PCI-E MPS turning and using
+				the BIOS configured MPS defaults.
+		pcie_bus_safe	[X86] Use the smallest common denominator MPS
+				of the entire tree below a root complex for every device
+				on that fabric. Can avoid inconsistent mps problem caused
+				by hotplug.

Documentation/kernel-parameters.txt bytes respectively. Such letter suffixes can also be entirely omitted. · line 2245

Quoted 10 lines
Documentation/kernel-parameters.txt +7 -0
+		pcie_bus_perf	[X86] Configure pcie device MPS to the largest
+				allowable MPS based on its parent bus.Improve performance
+				as much as possible.
+		pcie_bus_peer2peer	[X86] Make the system wide MPS the smallest
+				possible value (128B).This configuration could prevent it
+				from working by having the MPS on one root port different
+				than the MPS on another.
 		cbiosize=nn[KMG]	The fixed amount of bus space which is
 				reserved for the CardBus bridge's IO window.
 				The default value is 256 bytes.

I was searching for documentation on this the other day.

Quoted 3 lines

It's not just X86 that use these options, PowerPC and Tile also use them (grep for users of pcie_bus_configure_settings). I've also noticed a call to it from hotplug as well...

Hi Andrew,
Thanks for reminder! I will update this patch right now.

Quoted 4 lines

In addition these options also have an effect on MRRS - I've not figured out what effect they have, but you can look in drivers/pci/probe.c at the pcie_write_mrrs function.

Quoted 7 lines
Quoted 2 lines

This is a separate issue, Andrew, can you provide the effetct problem log or detail information? That will helps us to analyze this issue.

No this isn't a bug. When pcie_bus_perf is set, not only does it change the MPS as described in your documentation - but it also changes the MRRS for better performance. I felt this should also be included in your documentation of pcie_bus_perf.

Will add it.

Quoted 6 lines

The pcie_write_mrrs function uses pcie_bus_config to determine if a change to the MRRS should be made.

(What I don't understand is that the comments in this function suggest the MRRS cannot be larger than the MPS - I thought it could be?)

I trace the change log about pcie_write_mrrs() function, my understanding for comment
"it cannot be configured larger than the MPS the device or the bus can support" is that jon assume "device will never generate packets larger than MPS", so we can focus on upstream requests. If not, we should also concern the downstream request packet whether can be received by upstream device normally, maybe upstream mps is smaller than downstream device's mrrs.

Quoted 6 lines

Andrew Murray

.

Signature · 2 lines
Thanks!
Yijing