doc: add information to update dma entry limit

Message ID 20230705105307.5495-1-nipun.gupta@amd.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series doc: add information to update dma entry limit |

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-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Gupta, Nipun July 5, 2023, 10:53 a.m. UTC
  VFIO module provides configurable dma_entry_limit
parameter to store the DMA entries. By default this
is 64K and if we are using --no-huge, we shall need
to increase the value of dma_entry_limit. Add
commands in linux_gsg document to change the
dma_entry_limit.

Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
---
 doc/guides/linux_gsg/linux_drivers.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
  

Comments

Thomas Monjalon July 5, 2023, 12:56 p.m. UTC | #1
05/07/2023 12:53, Nipun Gupta:
> VFIO module provides configurable dma_entry_limit
> parameter to store the DMA entries. By default this
> is 64K and if we are using --no-huge, we shall need
> to increase the value of dma_entry_limit. Add
> commands in linux_gsg document to change the
> dma_entry_limit.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
> ---
>  doc/guides/linux_gsg/linux_drivers.rst | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
> index 2cec1ebede..b729bb38a8 100644
> --- a/doc/guides/linux_gsg/linux_drivers.rst
> +++ b/doc/guides/linux_gsg/linux_drivers.rst
> @@ -180,6 +180,21 @@ VFIO module parameter ``dma_entry_limit`` with a default value of 64K.
>  When application is out of DMA entries, these limits need to be adjusted to
>  increase the allowed limit.
>  
> +When ``no-huge`` parameter is used, the page size used is of smaller size of

I would add "--" to have the full option "--no-huge".
By the way, this is an "option" in the shell language :-)

> +``4K`` or ``64K`` and we shall need to increase ``dma_entry_limit``.
> +To update the ``dma_entry_limit``, ``vfio_iommu_type1`` has to be loaded with
> +additional module parameter:
> +
> +.. code-block:: console
> +
> +   modprobe vfio_iommu_type1 dma_entry_limit=512000
> +
> +Alternatively, one can also change this value in an already loaded kernel module:
> +
> +.. code-block:: console
> +
> +   echo 512000 > /sys/module/vfio_iommu_type1/parameters/dma_entry_limit

That looks good, thank you.
  

Patch

diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index 2cec1ebede..b729bb38a8 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -180,6 +180,21 @@  VFIO module parameter ``dma_entry_limit`` with a default value of 64K.
 When application is out of DMA entries, these limits need to be adjusted to
 increase the allowed limit.
 
+When ``no-huge`` parameter is used, the page size used is of smaller size of
+``4K`` or ``64K`` and we shall need to increase ``dma_entry_limit``.
+To update the ``dma_entry_limit``, ``vfio_iommu_type1`` has to be loaded with
+additional module parameter:
+
+.. code-block:: console
+
+   modprobe vfio_iommu_type1 dma_entry_limit=512000
+
+Alternatively, one can also change this value in an already loaded kernel module:
+
+.. code-block:: console
+
+   echo 512000 > /sys/module/vfio_iommu_type1/parameters/dma_entry_limit
+
 Creating Virtual Functions using vfio-pci
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~