doc: clarify mempool striding optimisation on Arm

Message ID 20240715144420.36292-1-jack.bond-preston@foss.arm.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series doc: clarify mempool striding optimisation on Arm |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

Jack Bond-Preston July 15, 2024, 2:44 p.m. UTC
The mempool memory channel striding optimisation is not necessary on
Arm platforms.
Update the Programmer's Guide's mempool section to clarify this.

Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
 doc/guides/prog_guide/mempool_lib.rst | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Stephen Hemminger July 17, 2024, 2:25 a.m. UTC | #1
On Mon, 15 Jul 2024 15:44:20 +0100
Jack Bond-Preston <jack.bond-preston@foss.arm.com> wrote:

> The mempool memory channel striding optimisation is not necessary on
> Arm platforms.
> Update the Programmer's Guide's mempool section to clarify this.
> 
> Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
> Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
> ---

The whole memory channels argument has been a problem from day 0 of DPDK.
There is no good way to find it from the OS, and it was never clear how much impact
it had anyway. It would simplify users experience if it was deprecated or at least
not required and rarely used.
  
Bruce Richardson July 17, 2024, 10:40 a.m. UTC | #2
On Tue, Jul 16, 2024 at 07:25:41PM -0700, Stephen Hemminger wrote:
> On Mon, 15 Jul 2024 15:44:20 +0100
> Jack Bond-Preston <jack.bond-preston@foss.arm.com> wrote:
> 
> > The mempool memory channel striding optimisation is not necessary on
> > Arm platforms.
> > Update the Programmer's Guide's mempool section to clarify this.
> > 
> > Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
> > Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
> > ---
> 
> The whole memory channels argument has been a problem from day 0 of DPDK.
> There is no good way to find it from the OS, and it was never clear how much impact
> it had anyway. It would simplify users experience if it was deprecated or at least
> not required and rarely used.

The default for mempools (at least on x86) is set to 4 which is a
reasonable value, and so specifying memory channels is not really required
for running DPDK in most cases (I never use the -n flag when running tests
myself). While I don't think we should deprecate the option, I feel it
should be removed from our examples and scripts.  Hopefully in future a
method of determining memory channels from code can be come up with that we
can use, but in the meantime using a sane default I feel is good enough.

/Bruce
  
Thomas Monjalon July 29, 2024, 7:46 p.m. UTC | #3
15/07/2024 16:44, Jack Bond-Preston:
> The mempool memory channel striding optimisation is not necessary on
> Arm platforms.
> Update the Programmer's Guide's mempool section to clarify this.
> 
> Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
> Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
> ---
> +.. note::
> +
> +    This feature is not present for Arm systems. Modern Arm Interconnects choose the SN-F (memory
> +    channel) using a hash of memory address bits. As a result, the load is distributed evenly in all
> +    cases, including the above described, rendering this feature unnecessary.

Applied with indentation changes, thanks.
  

Patch

diff --git a/doc/guides/prog_guide/mempool_lib.rst b/doc/guides/prog_guide/mempool_lib.rst
index 4db577fe18..988b0e80c1 100644
--- a/doc/guides/prog_guide/mempool_lib.rst
+++ b/doc/guides/prog_guide/mempool_lib.rst
@@ -77,6 +77,12 @@  When creating a new pool, the user can specify to use this feature or not.
 
 .. _mempool_local_cache:
 
+.. note::
+
+    This feature is not present for Arm systems. Modern Arm Interconnects choose the SN-F (memory
+    channel) using a hash of memory address bits. As a result, the load is distributed evenly in all
+    cases, including the above described, rendering this feature unnecessary.
+
 Local Cache
 -----------