From 1d5da94a433e8e42e425bebea7502c8268b81fd6 Mon Sep 17 00:00:00 2001 From: Hadi Rayan Al-Sandid Date: Fri, 6 Jun 2025 16:18:41 +0200 Subject: [PATCH] docs: minor improvement to core-pinning documentation Type: docs Change-Id: I05691e77855832ebbd9a3f9ee7de8a4edc1d75fe Signed-off-by: Hadi Rayan Al-Sandid --- docs/configuration/reference.rst | 14 +++++++++----- docs/spelling_wordlist.txt | 1 + src/vpp/conf/startup.conf | 4 ++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/configuration/reference.rst b/docs/configuration/reference.rst index 9378ce5b589..e2016b1d0e6 100644 --- a/docs/configuration/reference.rst +++ b/docs/configuration/reference.rst @@ -469,12 +469,16 @@ CPU cores while skipping "skip-cores" CPU core(s) and main thread's CPU core relative ^^^^^^^^^ -Apply thread pinning configuration with respect to the available logical cores -in the current control group CPU set. +Apply thread pinning configuration with respect to the logical cores available +to the VPP process, rather than all logical cores present on the host machine. + By default, VPP applies the thread pinning configuration with respect to the -available logical cores on host (e.g. '/sys/devices/system/cpu/online'). With -the 'relative' keyword, the thread pinning configuration is applied with respect -to the available logical cores (obtained with sched_getaffinity). +available logical cores on host (e.g. '/sys/devices/system/cpu/online'), but with +the 'relative' keyword, we apply the thread pinning configuration with respect +to logical cores available to the VPP process (obtained with sched_getaffinity). + +This parameter can be useful when running VPP in an environment with restricted access +to host CPU resources (e.g. running in a container, or using taskset). .. code-block:: console diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 51b929e0f60..cd9d75089cf 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -1135,6 +1135,7 @@ Tahr tapcli tcp tcpcontrolbits +taskset te teardown tearDown diff --git a/src/vpp/conf/startup.conf b/src/vpp/conf/startup.conf index 8e7aebd8271..938869d61a7 100644 --- a/src/vpp/conf/startup.conf +++ b/src/vpp/conf/startup.conf @@ -81,6 +81,10 @@ cpu { ## and main thread's CPU core # workers 2 + ## Apply thread pinning configuration with respect to the logical cores available + ## to VPP at launch, rather than all logical cores present on the host machine + # relative + ## Set scheduling policy and priority of main and worker threads ## Scheduling policy options are: other (SCHED_OTHER), batch (SCHED_BATCH) -- 2.16.6