This proposal describes a method for translating any huge page
address from virtual to physical or vice versa using simple
addition or subtraction of a single fixed value. This allows
devices to efficiently access arbitrary huge page memory, even
stack data when worker stacks are in huge pages.

When legacy memory mode is used, it is possible to map a single
virtual memory region large enough to cover all huge pages. During
legacy hugepage init, each hugepage is mapped into that region.
Once all pages have been mapped, any unused holes in that memory
region are unmapped.

This feature is applicable when rte_eal_iova_mode() == RTE_IOVA_PA
and could be enabled either by default when the legacy memory EAL
option is given, or a new EAL option could be added to specifically
enable this feature.

It may be desirable to set a capability bit when this feature is
enabled to allow drivers to behave differently depending on the
state of that flag.

We have been working for some time with an internal patch that
implements this functionality. While this patch works for us, it
is not ready to be submitted upstream and we are open to suggested
improvements. We would like to know whether this feature may be of
interest to the wider DPDK community.

Reply via email to