[v2] doc: update Linux core isolation guide
Checks
Commit Message
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Update Linux core isolation guide to include isolation from
timers, rcu processing and IRQs.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
v2 Changes:
- Add references to the parameters used.
- Add note about Linux cgroups.
doc/guides/linux_gsg/enable_func.rst | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
Comments
On Tue, 17 May 2022 23:38:55 +0530
<pbhagavatula@marvell.com> wrote:
> +
> +.. Note::
> +
> + For more fine grained control over resource management and performance tuning one can look
> + into ``Linux cgroups``.
Please provide a better link than just search terms:
Suggestions:
Cgroups uses cpusets.
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cpusets.html
Systemd provides standard API for system service contiainers.
https://www.freedesktop.org/software/systemd/man/systemd.exec.html
- See CPUAffinity
See Also:
https://man7.org/linux/man-pages/man7/cpuset.7.html
https://www.suse.com/c/cpu-isolation-practical-example-part-5/
https://www.rcannings.com/systemd-core-isolation/
> On Tue, 17 May 2022 23:38:55 +0530
> <pbhagavatula@marvell.com> wrote:
>
> > +
> > +.. Note::
> > +
> > + For more fine grained control over resource management and
> performance tuning one can look
> > + into ``Linux cgroups``.
>
> Please provide a better link than just search terms:
>
Sure, I will add the below mention links.
Thanks,
Pavan.
> Suggestions:
>
> Cgroups uses cpusets.
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.kernel.org_doc_html_latest_admin-2Dguide_cgroup-
> 2Dv1_cpusets.html&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=E3SgYMjt
> KCMVsB-fmvgGV3o-g_fjLhk5Pupi9ijohpc&m=W4c3sgjcX-
> QYOzJv3083R9UxKOzobyP_wZgBG3KO3B6qRTgub_xwUZXA8Iu6tJVc&s=_D2z
> m10RTVVLAgXCM9_ZCdBqwgy5KmDgM1oS39b_ZOc&e=
>
> Systemd provides standard API for system service contiainers.
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.freedesktop.org_software_systemd_man_systemd.exec.html&d
> =DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=E3SgYMjtKCMVsB-fmvgGV3o-
> g_fjLhk5Pupi9ijohpc&m=W4c3sgjcX-
> QYOzJv3083R9UxKOzobyP_wZgBG3KO3B6qRTgub_xwUZXA8Iu6tJVc&s=DUY
> 1DqusOfcBDJdEbLXK4fKGT1mC6g7pSR9k4bUA8Cg&e=
> - See CPUAffinity
>
>
>
> See Also:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__man7.org_linux_man-
> 2Dpages_man7_cpuset.7.html&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r
> =E3SgYMjtKCMVsB-fmvgGV3o-g_fjLhk5Pupi9ijohpc&m=W4c3sgjcX-
> QYOzJv3083R9UxKOzobyP_wZgBG3KO3B6qRTgub_xwUZXA8Iu6tJVc&s=JQe
> W8pniCghPjX7-Ek2Jte0mjAhDiUJqMOHKyD4Jxvg&e=
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.suse.com_c_cpu-2Disolation-2Dpractical-2Dexample-2Dpart-
> 2D5_&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=E3SgYMjtKCMVsB-
> fmvgGV3o-g_fjLhk5Pupi9ijohpc&m=W4c3sgjcX-
> QYOzJv3083R9UxKOzobyP_wZgBG3KO3B6qRTgub_xwUZXA8Iu6tJVc&s=QOs
> 65Ok6O0iO8XmijbcD_4RXwwkM9BroclTePWKiPco&e=
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.rcannings.com_systemd-2Dcore-
> 2Disolation_&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=E3SgYMjtKCMVs
> B-fmvgGV3o-g_fjLhk5Pupi9ijohpc&m=W4c3sgjcX-
> QYOzJv3083R9UxKOzobyP_wZgBG3KO3B6qRTgub_xwUZXA8Iu6tJVc&s=mQo
> JS4euMdCV2BI2UzGptDdICygMwBMZdJ6OWtjpRYA&e=
@@ -90,16 +90,28 @@ Using Linux Core Isolation to Reduce Context Switches
-----------------------------------------------------
While the threads used by a DPDK application are pinned to logical cores on the system,
-it is possible for the Linux scheduler to run other tasks on those cores also.
-To help prevent additional workloads from running on those cores,
-it is possible to use the ``isolcpus`` Linux kernel parameter to isolate them from the general Linux scheduler.
+it is possible for the Linux scheduler to run other tasks on those cores.
+To help prevent additional workloads, timers, rcu processing and IRQs from running on those cores, it is possible to use
+the Linux kernel parameters ``isolcpus``, ``nohz_full``, ``irqaffinity`` to isolate them from the general Linux scheduler tasks.
-For example, if DPDK applications are to run on logical cores 2, 4 and 6,
+For example, if a given CPU has 0-7 cores and DPDK applications are to run on logical cores 2, 4 and 6,
the following should be added to the kernel parameter list:
.. code-block:: console
- isolcpus=2,4,6
+ isolcpus=2,4,6 nohz_full=2,4,6 irqaffinity=0,1,3,5,7
+
+.. Note::
+
+ More detailed information about the above parameters can be found at
+ https://www.kernel.org/doc/html/latest/timers/no_hz.html
+ https://www.kernel.org/doc/html/latest/core-api/irq/
+ https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
+
+.. Note::
+
+ For more fine grained control over resource management and performance tuning one can look
+ into ``Linux cgroups``.
.. _High_Precision_Event_Timer: