DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: john.mcnamara@intel.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v2 6/8] doc/linux_gsg: shorten details on HPET use
Date: Thu, 10 Mar 2022 12:38:41 +0000	[thread overview]
Message-ID: <20220310123843.612207-7-bruce.richardson@intel.com> (raw)
In-Reply-To: <20220310123843.612207-1-bruce.richardson@intel.com>

As best we can tell, the HPET timers are not commonly used, so there is
little need to give extensive detail and commentry on them in the Linux
GSG. As such, we can reduce the GSG section to just a single subsection
and also move it down the page below items which are likely of greater
importance.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/linux_gsg/enable_func.rst | 80 ++++++++++------------------
 1 file changed, 27 insertions(+), 53 deletions(-)

diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index b5c4c652d7..0036c542f5 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -8,59 +8,6 @@
 Enabling Additional Functionality
 =================================
 
-.. _High_Precision_Event_Timer:
-
-High Precision Event Timer (HPET) Functionality
------------------------------------------------
-
-BIOS Support
-~~~~~~~~~~~~
-
-The High Precision Timer (HPET) must be enabled in the platform BIOS if the HPET is to be used.
-Otherwise, the Time Stamp Counter (TSC) is used by default.
-The BIOS is typically accessed by pressing F2 while the platform is starting up.
-The user can then navigate to the HPET option. On the Crystal Forest platform BIOS, the path is:
-**Advanced -> PCH-IO Configuration -> High Precision Timer ->** (Change from Disabled to Enabled if necessary).
-
-On a system that has already booted, the following command can be issued to check if HPET is enabled::
-
-   grep hpet /proc/timer_list
-
-If no entries are returned, HPET must be enabled in the BIOS (as per the instructions above) and the system rebooted.
-
-Linux Kernel Support
-~~~~~~~~~~~~~~~~~~~~
-
-The DPDK makes use of the platform HPET timer by mapping the timer counter into the process address space, and as such,
-requires that the ``HPET_MMAP`` kernel configuration option be enabled.
-
-.. warning::
-
-    On Fedora, and other common distributions such as Ubuntu, the ``HPET_MMAP`` kernel option is not enabled by default.
-    To recompile the Linux kernel with this option enabled, please consult the distributions documentation for the relevant instructions.
-
-Enabling HPET in the DPDK
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-By default, HPET support is disabled in the DPDK build configuration files.
-To use HPET, use the following meson build option which will enable the HPET settings at compile time::
-
-   meson configure -Duse_hpet=true
-
-For an application to use the ``rte_get_hpet_cycles()`` and ``rte_get_hpet_hz()`` API calls,
-and optionally to make the HPET the default time source for the rte_timer library,
-the new ``rte_eal_hpet_init()`` API call should be called at application initialization.
-This API call will ensure that the HPET is accessible, returning an error to the application if it is not,
-for example, if ``HPET_MMAP`` is not enabled in the kernel.
-The application can then determine what action to take, if any, if the HPET is not available at run-time.
-
-.. note::
-
-    For applications that require timing APIs, but not the HPET timer specifically,
-    it is recommended that the ``rte_get_timer_cycles()`` and ``rte_get_timer_hz()`` API calls be used instead of the HPET-specific APIs.
-    These generic APIs can work with either TSC or HPET time sources, depending on what is requested by an application call to ``rte_eal_hpet_init()``,
-    if any, and on what is available on the system at runtime.
-
 .. _Running_Without_Root_Privileges:
 
 Running DPDK Applications Without Root Privileges
@@ -154,6 +101,33 @@ the following should be added to the kernel parameter list:
 
     isolcpus=2,4,6
 
+.. _High_Precision_Event_Timer:
+
+High Precision Event Timer (HPET) Functionality
+-----------------------------------------------
+
+DPDK can support the system HPET as a timer source rather than the system default timers,
+such as the core Time-Stamp Counter (TSC) on x86 systems.
+To enable HPET support in DPDK:
+
+1. Ensure that HPET is enabled in BIOS settings.
+2. Enable ``HPET_MMAP`` support in kernel configuration.
+   Note that this my involve doing a kernel rebuild,
+   as many common linux distributions do *not* have this setting enabled by default in their kernel builds.
+3. Enable DPDK support for HPET by using the build-time meson option ``use_hpet``,
+   for example, ``meson configure -Duse_hpet=true``
+
+For an application to use the ``rte_get_hpet_cycles()`` and ``rte_get_hpet_hz()`` API calls,
+and optionally to make the HPET the default time source for the rte_timer library,
+the ``rte_eal_hpet_init()`` API call should be called at application initialization.
+This API call will ensure that the HPET is accessible, returning an error to the application if it is not.
+
+For applications that require timing APIs, but not the HPET timer specifically,
+it is recommended that the ``rte_get_timer_cycles()`` and ``rte_get_timer_hz()`` API calls be used instead of the HPET-specific APIs.
+These generic APIs can work with either TSC or HPET time sources,
+depending on what is requested by an application call to ``rte_eal_hpet_init()``,
+if any, and on what is available on the system at runtime.
+
 Loading the DPDK KNI Kernel Module
 ----------------------------------
 
-- 
2.32.0


  parent reply	other threads:[~2022-03-10 12:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 14:49 [PATCH 0/5] Small Doc improvements for Linux GSG Bruce Richardson
2022-03-08 14:49 ` [PATCH 1/5] doc/linux_gsg: add driver guides to document list Bruce Richardson
2022-03-08 14:49 ` [PATCH 2/5] doc/linux_gsg: drop note about old chipset Bruce Richardson
2022-03-08 14:49 ` [PATCH 3/5] doc/linux_gsg: remove duplicated note Bruce Richardson
2022-03-08 14:50 ` [PATCH 4/5] doc/linux_gsg: merge requirements section for app building Bruce Richardson
2022-03-08 14:50 ` [PATCH 5/5] doc/linux_gsg: expand list of directories Bruce Richardson
2022-03-10 12:38 ` [PATCH v2 0/8] Linux GSG doc updates Bruce Richardson
2022-03-10 12:38   ` [PATCH v2 1/8] doc/linux_gsg: add driver guides to document list Bruce Richardson
2022-03-10 12:38   ` [PATCH v2 2/8] doc/linux_gsg: drop note about old chipset Bruce Richardson
2022-03-10 12:38   ` [PATCH v2 3/8] doc/linux_gsg: remove duplicated note Bruce Richardson
2022-03-10 12:38   ` [PATCH v2 4/8] doc/linux_gsg: merge requirements section for app building Bruce Richardson
2022-03-10 12:38   ` [PATCH v2 5/8] doc/linux_gsg: expand list of directories Bruce Richardson
2022-03-10 12:38   ` Bruce Richardson [this message]
2022-03-10 12:38   ` [PATCH v2 7/8] doc/linux_gsg: drop reference to KNI Bruce Richardson
2022-03-10 12:38   ` [PATCH v2 8/8] doc/linux_gsg: remove section on IOMMU pass-through Bruce Richardson
2022-03-15 18:46   ` [PATCH v2 0/8] Linux GSG doc updates Thomas Monjalon
2022-03-15 21:41     ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220310123843.612207-7-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).